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