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