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 |
3 |
dnl configuration so that no manual editing of the Makefile should be |
4 |
dnl necessary |
5 |
dnl |
6 |
dnl $Id: configure.in,v 1.25 2004/03/01 23:06:22 fp Exp $ |
7 |
dnl |
8 |
|
9 |
AC_INIT(uulib.c) |
10 |
AC_PREREQ(2.9) |
11 |
AC_CONFIG_HEADER(config.h) |
12 |
|
13 |
# |
14 |
# package revision |
15 |
# |
16 |
VERSION=0.5 |
17 |
PATCH=20 |
18 |
|
19 |
AC_PROG_CC |
20 |
AC_PROG_CPP |
21 |
wi_PROTOTYPES |
22 |
AC_PROG_MAKE_SET |
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 |
|
32 |
# |
33 |
# Checks for header files and library functions |
34 |
# |
35 |
|
36 |
AC_HEADER_STDC |
37 |
AC_TYPE_SIZE_T |
38 |
AC_HEADER_TIME |
39 |
AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h) |
40 |
AC_CHECK_HEADERS(io.h sys/time.h) |
41 |
AC_CHECK_FUNCS(gettimeofday) |
42 |
|
43 |
AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,_FP_tempnam)) |
44 |
|
45 |
# |
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 |
|
93 |
# |
94 |
# On some systems (so far, OS2 and WINDOWS), functions that are exported |
95 |
# from a DLL must be declared specifically. |
96 |
# |
97 |
|
98 |
AC_DEFINE_UNQUOTED(UUEXPORT,) |
99 |
AC_DEFINE_UNQUOTED(TOOLEXPORT,) |
100 |
|
101 |
# |
102 |
# set version number |
103 |
# |
104 |
AC_MSG_CHECKING([version number]) |
105 |
version_number="$VERSION"pl"$PATCH" |
106 |
AC_MSG_RESULT($version_number) |
107 |
AC_SUBST(VERSION) |
108 |
AC_SUBST(PATCH) |
109 |
|
110 |
# |
111 |
# done |
112 |
# |
113 |
|
114 |
AC_OUTPUT(Makefile) |