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.1 2002/03/31 19:51:28 root Exp $ |
|
|
7 | dnl |
5 | |
8 | |
6 | AC_INIT(uulib.c) |
9 | AC_INIT(uulib.c) |
7 | AC_PREREQ(2.9) |
10 | AC_PREREQ(2.9) |
8 | AC_CONFIG_HEADER(config.h) |
11 | AC_CONFIG_HEADER(config.h) |
9 | |
12 | |
… | |
… | |
11 | # package revision |
14 | # package revision |
12 | # |
15 | # |
13 | VERSION=0.5 |
16 | VERSION=0.5 |
14 | PATCH=15 |
17 | PATCH=15 |
15 | |
18 | |
16 | AC_ARG_WITH(cc,,CC=$with_cc) |
19 | AC_ARG_ENABLE(optimize,[ --disable-optimize compile for debugging],optimize=$enableval,optimize=yes) |
17 | AC_ARG_WITH(cflags,,CFLAGS=$with_cflags) |
|
|
18 | |
20 | |
19 | AC_PROG_CC |
21 | AC_PROG_CC |
20 | AC_PROG_CPP |
22 | AC_PROG_CPP |
|
|
23 | AC_C_CROSS |
21 | wi_CFLAGS |
24 | wi_CFLAGS |
22 | wi_PROTOTYPES |
25 | wi_PROTOTYPES |
23 | AC_PROG_MAKE_SET |
26 | AC_PROG_MAKE_SET |
24 | AC_PROG_RANLIB |
27 | AC_PROG_RANLIB |
|
|
28 | |
|
|
29 | # |
|
|
30 | # When optimization is enabled, remove -g from CFLAGS and add -O |
|
|
31 | # |
|
|
32 | |
|
|
33 | if test "$optimize" = "yes" ; then |
|
|
34 | AC_MSG_CHECKING([compiler flags]) |
|
|
35 | CFLAGS=`echo $CFLAGS | sed 's/-g//g'` |
|
|
36 | case $CFLAGS in |
|
|
37 | *"-O"*) |
|
|
38 | ;; |
|
|
39 | *) |
|
|
40 | CFLAGS="$CFLAGS -O" |
|
|
41 | ;; |
|
|
42 | esac |
|
|
43 | AC_MSG_RESULT(done) |
|
|
44 | fi |
25 | |
45 | |
26 | if test "$wi_cv_prototypes" = no ; then |
46 | if test "$wi_cv_prototypes" = no ; then |
27 | AC_WARN([Your compiler does not support function prototyping and]) |
47 | AC_WARN([Your compiler does not support function prototyping and]) |
28 | AC_WARN([is not able to properly compile this package. What a pity.]) |
48 | AC_WARN([is not able to properly compile this package. What a pity.]) |
29 | AC_WARN([Get gcc, or any compiler that supports function prototypes.]) |
49 | AC_WARN([Get gcc, or any compiler that supports function prototypes.]) |
… | |
… | |
39 | AC_HEADER_TIME |
59 | AC_HEADER_TIME |
40 | AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h) |
60 | AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h) |
41 | AC_CHECK_HEADERS(io.h sys/time.h) |
61 | AC_CHECK_HEADERS(io.h sys/time.h) |
42 | AC_CHECK_FUNCS(gettimeofday) |
62 | AC_CHECK_FUNCS(gettimeofday) |
43 | |
63 | |
44 | AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,FP_tempnam)) |
64 | AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,_FP_tempnam)) |
45 | |
|
|
46 | AC_CHECK_FUNC(chmod,AC_DEFINE(HAVE_CHMOD)) |
|
|
47 | AC_CHECK_FUNC(umask,AC_DEFINE(HAVE_UMASK)) |
|
|
48 | AC_CHECK_FUNC(mkstemp,AC_DEFINE(HAVE_MKSTEMP)) |
|
|
49 | |
65 | |
50 | # |
66 | # |
51 | # strerror might be internally defined. this would cause a |
67 | # strerror might be internally defined. this would cause a |
52 | # CHECK_FUNCS(strerror) to fail because it'd be called with |
68 | # CHECK_FUNCS(strerror) to fail because it'd be called with |
53 | # zero arguments. So use our own code. |
69 | # zero arguments. So use our own code. |
… | |
… | |
55 | AC_MSG_CHECKING([for strerror]) |
71 | AC_MSG_CHECKING([for strerror]) |
56 | AC_TRY_LINK([ |
72 | AC_TRY_LINK([ |
57 | char *blubb() { return (char *) strerror (42); } |
73 | char *blubb() { return (char *) strerror (42); } |
58 | ],[ |
74 | ],[ |
59 | (void) blubb(); |
75 | (void) blubb(); |
60 | ],have_strerror=yes,AC_DEFINE(strerror,FP_strerror) |
76 | ],have_strerror=yes,AC_DEFINE(strerror,_FP_strerror) |
61 | have_strerror=no) |
77 | have_strerror=no) |
62 | AC_MSG_RESULT($have_strerror) |
78 | AC_MSG_RESULT($have_strerror) |
63 | |
79 | |
64 | AC_MSG_CHECKING([for stdin]) |
80 | AC_MSG_CHECKING([for stdin]) |
65 | AC_TRY_LINK([ |
81 | AC_TRY_LINK([ |
… | |
… | |
115 | # |
131 | # |
116 | # done |
132 | # done |
117 | # |
133 | # |
118 | |
134 | |
119 | AC_OUTPUT(Makefile) |
135 | AC_OUTPUT(Makefile) |
120 | |
|
|