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