1 | dnl This file is an input file used by the GNU "autoconf" program to |
1 | dnl This file is an input file used by the GNU "autoconf" program to |
2 | dnl generate the file "configure", which tries to guess your system |
2 | dnl generate the file "configure", which tries to guess your system |
3 | dnl configuration so that no manual editing of the Makefile should be |
3 | dnl configuration so that no manual editing of the Makefile should be |
4 | dnl necessary |
4 | dnl necessary |
5 | dnl |
|
|
6 | dnl $Id: configure.in,v 1.4.2.5 2004/04/18 19:55:46 root Exp $ |
|
|
7 | dnl |
5 | dnl |
8 | |
6 | |
9 | AC_INIT(uulib.c) |
7 | AC_INIT(uulib.c) |
10 | AC_PREREQ(2.9) |
8 | AC_PREREQ(2.9) |
11 | AC_CONFIG_HEADER(config.h) |
9 | AC_CONFIG_HEADER(config.h) |
… | |
… | |
14 | # package revision |
12 | # package revision |
15 | # |
13 | # |
16 | VERSION=0.5 |
14 | VERSION=0.5 |
17 | PATCH=20 |
15 | PATCH=20 |
18 | |
16 | |
|
|
17 | AC_ARG_WITH(cc,,CC=$with_cc) |
|
|
18 | AC_ARG_WITH(cflags,,CFLAGS=$with_cflags) |
|
|
19 | |
19 | AC_PROG_CC |
20 | AC_PROG_CC |
20 | AC_PROG_CPP |
21 | AC_PROG_CPP |
21 | wi_PROTOTYPES |
|
|
22 | AC_PROG_MAKE_SET |
22 | AC_PROG_MAKE_SET |
23 | AC_PROG_RANLIB |
23 | AC_PROG_RANLIB |
24 | |
|
|
25 | if test "$wi_cv_prototypes" = no ; then |
|
|
26 | AC_WARN([Your compiler does not support function prototyping and]) |
|
|
27 | AC_WARN([is not able to properly compile this package. What a pity.]) |
|
|
28 | AC_WARN([Get gcc, or any compiler that supports function prototypes.]) |
|
|
29 | exit 1 |
|
|
30 | fi |
|
|
31 | |
24 | |
32 | # |
25 | # |
33 | # Checks for header files and library functions |
26 | # Checks for header files and library functions |
34 | # |
27 | # |
35 | |
28 | |
36 | AC_HEADER_STDC |
|
|
37 | AC_TYPE_SIZE_T |
29 | AC_TYPE_SIZE_T |
38 | AC_HEADER_TIME |
30 | AC_CHECK_HEADERS(fcntl.h unistd.h) |
39 | AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h) |
|
|
40 | AC_CHECK_HEADERS(io.h sys/time.h) |
31 | AC_CHECK_HEADERS(io.h sys/time.h) |
41 | AC_CHECK_FUNCS(gettimeofday) |
|
|
42 | |
32 | |
43 | AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,_FP_tempnam)) |
33 | CFLAGS="$CFLAGS -D_GNU_SOURCE" |
|
|
34 | AC_CHECK_FUNCS(tempnam gettimeofday flockfile getc_unlocked feof_unlocked ferror_unlocked) |
|
|
35 | dnl AC_CHECK_FUNCS(strcasecmp strncasecmp strcasestr) |
44 | |
36 | |
45 | # |
37 | AC_CHECK_FUNCS(chmod umask mkstemp) |
46 | # strerror might be internally defined. this would cause a |
|
|
47 | # CHECK_FUNCS(strerror) to fail because it'd be called with |
|
|
48 | # zero arguments. So use our own code. |
|
|
49 | # |
|
|
50 | AC_MSG_CHECKING([for strerror]) |
|
|
51 | AC_TRY_LINK([ |
|
|
52 | char *blubb() { return (char *) strerror (42); } |
|
|
53 | ],[ |
|
|
54 | (void) blubb(); |
|
|
55 | ],have_strerror=yes,AC_DEFINE(strerror,_FP_strerror) |
|
|
56 | have_strerror=no) |
|
|
57 | AC_MSG_RESULT($have_strerror) |
|
|
58 | |
|
|
59 | AC_MSG_CHECKING([for stdin]) |
|
|
60 | AC_TRY_LINK([ |
|
|
61 | #include <stdio.h> |
|
|
62 | char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; } |
|
|
63 | ],[ |
|
|
64 | (void) blubb(); |
|
|
65 | ],have_stdio=yes,AC_DEFINE(HAVE_STDIO) |
|
|
66 | have_stdio=no) |
|
|
67 | AC_MSG_RESULT($have_stdio) |
|
|
68 | |
|
|
69 | if test "$ac_cv_header_stdc" = "no" ; then |
|
|
70 | AC_CHECK_HEADERS(stdarg.h varargs.h) |
|
|
71 | if test "$ac_cv_header_stdarg_h" = "no" ; then |
|
|
72 | if test "$ac_cv_header_varargs_h" = "no" ; then |
|
|
73 | AC_MSG_ERROR([neither stdarg.h nor varargs.h present]) |
|
|
74 | fi |
|
|
75 | fi |
|
|
76 | fi |
|
|
77 | |
|
|
78 | # |
|
|
79 | # Check whether this is a DOS-Based system. Another bogus test. |
|
|
80 | # Don't even bother to print a message. This code is needed so |
|
|
81 | # that autoheader includes the #undef into the final config.h |
|
|
82 | # and we can change the definition by hand on a really DOS |
|
|
83 | # system (where ./configure doesn't work anyway ...) |
|
|
84 | # |
|
|
85 | |
|
|
86 | if false ; then |
|
|
87 | AC_DEFINE(SYSTEM_DOS) |
|
|
88 | AC_DEFINE(SYSTEM_QUICKWIN) |
|
|
89 | AC_DEFINE(SYSTEM_WINDLL) |
|
|
90 | AC_DEFINE(SYSTEM_OS2) |
|
|
91 | fi |
|
|
92 | |
38 | |
93 | # |
39 | # |
94 | # On some systems (so far, OS2 and WINDOWS), functions that are exported |
40 | # On some systems (so far, OS2 and WINDOWS), functions that are exported |
95 | # from a DLL must be declared specifically. |
41 | # from a DLL must be declared specifically. |
96 | # |
42 | # |
… | |
… | |
110 | # |
56 | # |
111 | # done |
57 | # done |
112 | # |
58 | # |
113 | |
59 | |
114 | AC_OUTPUT(Makefile) |
60 | AC_OUTPUT(Makefile) |
|
|
61 | |