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