ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/configure.in
Revision: 1.1
Committed: Mon Jun 11 19:48:57 2001 UTC (22 years, 11 months ago) by root
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# Content
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
6 AC_INIT(uulib.c)
7 AC_PREREQ(2.9)
8 AC_CONFIG_HEADER(config.h)
9
10 #
11 # package revision
12 #
13 VERSION=0.5
14 PATCH=13
15
16 AC_ARG_WITH(cc,,CC=$with_cc)
17 AC_ARG_WITH(cflags,,CFLAGS=$with_cflags)
18
19 AC_PROG_CC
20 AC_PROG_CPP
21 wi_CFLAGS
22 wi_PROTOTYPES
23 AC_PROG_MAKE_SET
24 AC_PROG_RANLIB
25
26 if test "$wi_cv_prototypes" = no ; then
27 AC_WARN([Your compiler does not support function prototyping and])
28 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.])
30 exit 1
31 fi
32
33 #
34 # Checks for header files and library functions
35 #
36
37 AC_HEADER_STDC
38 AC_TYPE_SIZE_T
39 AC_HEADER_TIME
40 AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h)
41 AC_CHECK_HEADERS(io.h sys/time.h)
42 AC_CHECK_FUNCS(gettimeofday)
43
44 AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,FP_tempnam))
45
46 #
47 # strerror might be internally defined. this would cause a
48 # CHECK_FUNCS(strerror) to fail because it'd be called with
49 # zero arguments. So use our own code.
50 #
51 AC_MSG_CHECKING([for strerror])
52 AC_TRY_LINK([
53 char *blubb() { return (char *) strerror (42); }
54 ],[
55 (void) blubb();
56 ],have_strerror=yes,AC_DEFINE(strerror,FP_strerror)
57 have_strerror=no)
58 AC_MSG_RESULT($have_strerror)
59
60 AC_MSG_CHECKING([for stdin])
61 AC_TRY_LINK([
62 #include <stdio.h>
63 char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; }
64 ],[
65 (void) blubb();
66 ],have_stdio=yes,AC_DEFINE(HAVE_STDIO)
67 have_stdio=no)
68 AC_MSG_RESULT($have_stdio)
69
70 if test "$ac_cv_header_stdc" = "no" ; then
71 AC_CHECK_HEADERS(stdarg.h varargs.h)
72 if test "$ac_cv_header_stdarg_h" = "no" ; then
73 if test "$ac_cv_header_varargs_h" = "no" ; then
74 AC_MSG_ERROR([neither stdarg.h nor varargs.h present])
75 fi
76 fi
77 fi
78
79 #
80 # Check whether this is a DOS-Based system. Another bogus test.
81 # Don't even bother to print a message. This code is needed so
82 # that autoheader includes the #undef into the final config.h
83 # and we can change the definition by hand on a really DOS
84 # system (where ./configure doesn't work anyway ...)
85 #
86
87 if false ; then
88 AC_DEFINE(SYSTEM_DOS)
89 AC_DEFINE(SYSTEM_QUICKWIN)
90 AC_DEFINE(SYSTEM_WINDLL)
91 AC_DEFINE(SYSTEM_OS2)
92 fi
93
94 #
95 # On some systems (so far, OS2 and WINDOWS), functions that are exported
96 # from a DLL must be declared specifically.
97 #
98
99 AC_DEFINE_UNQUOTED(UUEXPORT,)
100 AC_DEFINE_UNQUOTED(TOOLEXPORT,)
101
102 #
103 # set version number
104 #
105 AC_MSG_CHECKING([version number])
106 version_number="$VERSION"pl"$PATCH"
107 AC_MSG_RESULT($version_number)
108 AC_SUBST(VERSION)
109 AC_SUBST(PATCH)
110
111 #
112 # done
113 #
114
115 AC_OUTPUT(Makefile)
116