Daily bump.
[official-gcc.git] / fastjar / configure.in
bloba3e8e90971c161ed549ade76be9023a4ad6c6f28
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(jartool.h)
3 AM_INIT_AUTOMAKE(fastjar, 0.92-gcc)
4 AM_CONFIG_HEADER(config.h)
6 dnl Checks for programs.
7 AC_PROG_CC
8 AC_PROG_INSTALL
9 AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/local/bin)
10 AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/local/bin)
11 AC_PATH_PROG(STRIP, strip, /usr/bin/strip, $PATH:/bin:/usr/bin:/usr/local/bin)
12 AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/local/bin)
13 AC_EXEEXT
15 AM_MAINTAINER_MODE
17 dnl Add warning flags if we are using gcc.
18 if test "$GCC" = yes; then
19   fastjar_warn_cflags='-W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings'
21 AC_SUBST(fastjar_warn_cflags)
23 dnl Checks for header files.
24 AC_HEADER_DIRENT
25 AC_HEADER_STDC
26 AC_STRUCT_TM
27 AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h)
29 dnl Checks for typedefs, structures, and compiler characteristics.
30 AC_TYPE_OFF_T
31 AC_STRUCT_TM
33 dnl Check for type-widths
34 AC_CHECK_SIZEOF(char)
35 AC_CHECK_SIZEOF(short)
36 AC_CHECK_SIZEOF(int)
37 AC_CHECK_SIZEOF(long)
38 AC_CHECK_SIZEOF(long long)
40 dnl Check byte order
41 AC_C_BIGENDIAN
43 AC_ARG_WITH(system-zlib,
44 [  --with-system-zlib      use installed libz])
46 ZLIBS=
47 ZDEPS=
48 ZINCS=
49 use_zlib=maybe
50 if test "$with_system_zlib" = yes; then
51    AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no)
52 else
53    use_zlib=no
56 if test "$use_zlib" = no; then
57    # Brain dead way to find tree's zlib.
58    ZDEPS='$(top_builddir)/../zlib/libz.a'
59    ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
60    ZINCS='-I$(top_srcdir)/../zlib'
62 AC_SUBST(ZLIBS)
63 AC_SUBST(ZDEPS)
64 AC_SUBST(ZINCS)
66 AC_OUTPUT(Makefile install-defs.sh)