ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/configure.in
Revision: 1.11
Committed: Tue Sep 15 17:03:36 2009 UTC (17 years ago) by root
Branch: MAIN
CVS Tags: rel-1_34, rel-1_33, rel-1_32, rel-1_31, rel-1_71, rel-1_5, rel-1_4, rel-1_7, rel-1_6, rel-1_62
Changes since 1.10: +2 -1 lines
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 dnl
6 dnl $Id$
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_ARG_WITH(cc,,CC=$with_cc)
20 AC_ARG_WITH(cflags,,CFLAGS=$with_cflags)
21
22 AC_PROG_CC
23 AC_PROG_CPP
24 wi_PROTOTYPES
25 AC_PROG_MAKE_SET
26 AC_PROG_RANLIB
27
28 if test "$wi_cv_prototypes" = no ; then
29 AC_WARN([Your compiler does not support function prototyping and])
30 AC_WARN([is not able to properly compile this package. What a pity.])
31 AC_WARN([Get gcc, or any compiler that supports function prototypes.])
32 exit 1
33 fi
34
35 #
36 # Checks for header files and library functions
37 #
38
39 AC_HEADER_STDC
40 AC_TYPE_SIZE_T
41 AC_HEADER_TIME
42 AC_CHECK_HEADERS(fcntl.h unistd.h memory.h malloc.h errno.h)
43 AC_CHECK_HEADERS(io.h sys/time.h)
44
45 CFLAGS="$CFLAGS -D_GNU_SOURCE"
46 AC_CHECK_FUNCS(gettimeofday fgetc_unlocked)
47 dnl AC_CHECK_FUNCS(strcasecmp strncasecmp strcasestr)
48
49 AC_CHECK_FUNC(tempnam,,AC_DEFINE(tempnam,FP_tempnam))
50
51 AC_CHECK_FUNC(chmod,AC_DEFINE(HAVE_CHMOD))
52 AC_CHECK_FUNC(umask,AC_DEFINE(HAVE_UMASK))
53 AC_CHECK_FUNC(mkstemp,AC_DEFINE(HAVE_MKSTEMP))
54
55 #
56 # strerror might be internally defined. this would cause a
57 # CHECK_FUNCS(strerror) to fail because it'd be called with
58 # zero arguments. So use our own code.
59 #
60 AC_MSG_CHECKING([for strerror])
61 AC_TRY_LINK([
62 char *blubb() { return (char *) strerror (42); }
63 ],[
64 (void) blubb();
65 ],have_strerror=yes,AC_DEFINE(strerror,FP_strerror)
66 have_strerror=no)
67 AC_MSG_RESULT($have_strerror)
68
69 AC_MSG_CHECKING([for stdin])
70 AC_TRY_LINK([
71 #include <stdio.h>
72 char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; }
73 ],[
74 (void) blubb();
75 ],have_stdio=yes,AC_DEFINE(HAVE_STDIO)
76 have_stdio=no)
77 AC_MSG_RESULT($have_stdio)
78
79 if test "$ac_cv_header_stdc" = "no" ; then
80 AC_CHECK_HEADERS(stdarg.h varargs.h)
81 if test "$ac_cv_header_stdarg_h" = "no" ; then
82 if test "$ac_cv_header_varargs_h" = "no" ; then
83 AC_MSG_ERROR([neither stdarg.h nor varargs.h present])
84 fi
85 fi
86 fi
87
88 #
89 # Check whether this is a DOS-Based system. Another bogus test.
90 # Don't even bother to print a message. This code is needed so
91 # that autoheader includes the #undef into the final config.h
92 # and we can change the definition by hand on a really DOS
93 # system (where ./configure doesn't work anyway ...)
94 #
95
96 if false ; then
97 AC_DEFINE(SYSTEM_DOS)
98 AC_DEFINE(SYSTEM_QUICKWIN)
99 AC_DEFINE(SYSTEM_WINDLL)
100 AC_DEFINE(SYSTEM_OS2)
101 fi
102
103 #
104 # On some systems (so far, OS2 and WINDOWS), functions that are exported
105 # from a DLL must be declared specifically.
106 #
107
108 AC_DEFINE_UNQUOTED(UUEXPORT,)
109 AC_DEFINE_UNQUOTED(TOOLEXPORT,)
110
111 #
112 # set version number
113 #
114 AC_MSG_CHECKING([version number])
115 version_number="$VERSION"pl"$PATCH"
116 AC_MSG_RESULT($version_number)
117 AC_SUBST(VERSION)
118 AC_SUBST(PATCH)
119
120 #
121 # done
122 #
123
124 AC_OUTPUT(Makefile)
125