1 dnl Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE(fastjar, 0.92-gcc)
4 AM_CONFIG_HEADER(config.h)
6 dnl Checks for programs.
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)
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.
27 AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h)
29 dnl Checks for typedefs, structures, and compiler characteristics.
33 # mkdir takes a single argument on some systems.
34 gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
36 dnl Check for type-widths
37 AC_COMPILE_CHECK_SIZEOF(char)
38 AC_COMPILE_CHECK_SIZEOF(short)
39 AC_COMPILE_CHECK_SIZEOF(int)
40 AC_COMPILE_CHECK_SIZEOF(long)
41 AC_COMPILE_CHECK_SIZEOF(long long)
46 AC_ARG_WITH(system-zlib,
47 [ --with-system-zlib use installed libz])
53 if test "$with_system_zlib" = yes; then
54 AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no)
59 if test "$use_zlib" = no; then
60 # Brain dead way to find tree's zlib.
61 ZDEPS='$(top_builddir)/../zlib/libz.a'
62 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
63 ZINCS='-I$(top_srcdir)/../zlib'
69 # Get the version trigger filename from the toplevel
70 if test "${with_gcc_version_trigger+set}" = set; then
71 gcc_version_trigger=$with_gcc_version_trigger
73 gcc_version_trigger=${srcdir}/version.c
76 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
77 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
81 AC_OUTPUT(Makefile install-defs.sh)