ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/configure.in
Revision: 1.4
Committed: Sun Feb 10 22:47:18 2002 UTC (22 years, 3 months ago) by root
Branch: MAIN
Branch point for: UUDEVIEW
Changes since 1.3: +1 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.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 root 1.2 PATCH=15
15 root 1.1
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 root 1.3 AC_CHECK_FUNC(chmod,AC_DEFINE(HAVE_CHMOD))
47     AC_CHECK_FUNC(umask,AC_DEFINE(HAVE_UMASK))
48 root 1.4 AC_CHECK_FUNC(mkstemp,AC_DEFINE(HAVE_MKSTEMP))
49 root 1.3
50 root 1.1 #
51     # strerror might be internally defined. this would cause a
52     # CHECK_FUNCS(strerror) to fail because it'd be called with
53     # zero arguments. So use our own code.
54     #
55     AC_MSG_CHECKING([for strerror])
56     AC_TRY_LINK([
57     char *blubb() { return (char *) strerror (42); }
58     ],[
59     (void) blubb();
60     ],have_strerror=yes,AC_DEFINE(strerror,FP_strerror)
61     have_strerror=no)
62     AC_MSG_RESULT($have_strerror)
63    
64     AC_MSG_CHECKING([for stdin])
65     AC_TRY_LINK([
66     #include <stdio.h>
67     char *blubb() { FILE *in, *out; in=stdin; out=stdout; return (char*)0; }
68     ],[
69     (void) blubb();
70     ],have_stdio=yes,AC_DEFINE(HAVE_STDIO)
71     have_stdio=no)
72     AC_MSG_RESULT($have_stdio)
73    
74     if test "$ac_cv_header_stdc" = "no" ; then
75     AC_CHECK_HEADERS(stdarg.h varargs.h)
76     if test "$ac_cv_header_stdarg_h" = "no" ; then
77     if test "$ac_cv_header_varargs_h" = "no" ; then
78     AC_MSG_ERROR([neither stdarg.h nor varargs.h present])
79     fi
80     fi
81     fi
82    
83     #
84     # Check whether this is a DOS-Based system. Another bogus test.
85     # Don't even bother to print a message. This code is needed so
86     # that autoheader includes the #undef into the final config.h
87     # and we can change the definition by hand on a really DOS
88     # system (where ./configure doesn't work anyway ...)
89     #
90    
91     if false ; then
92     AC_DEFINE(SYSTEM_DOS)
93     AC_DEFINE(SYSTEM_QUICKWIN)
94     AC_DEFINE(SYSTEM_WINDLL)
95     AC_DEFINE(SYSTEM_OS2)
96     fi
97    
98     #
99     # On some systems (so far, OS2 and WINDOWS), functions that are exported
100     # from a DLL must be declared specifically.
101     #
102    
103     AC_DEFINE_UNQUOTED(UUEXPORT,)
104     AC_DEFINE_UNQUOTED(TOOLEXPORT,)
105    
106     #
107     # set version number
108     #
109     AC_MSG_CHECKING([version number])
110     version_number="$VERSION"pl"$PATCH"
111     AC_MSG_RESULT($version_number)
112     AC_SUBST(VERSION)
113     AC_SUBST(PATCH)
114    
115     #
116     # done
117     #
118    
119     AC_OUTPUT(Makefile)
120