1 dnl Process this file with autoconf to produce a configure script.
4 AM_INIT_AUTOMAKE(fastjar, 0.92-gcc)
5 AM_CONFIG_HEADER(config.h)
7 dnl Checks for programs.
10 AC_PATH_PROG(RM, rm, /bin/rm, $PATH:/bin:/usr/bin:/usr/local/bin)
11 AC_PATH_PROG(CP, cp, /bin/cp, $PATH:/bin:/usr/bin:/usr/local/bin)
12 AC_PATH_PROG(STRIP, strip, /usr/bin/strip, $PATH:/bin:/usr/bin:/usr/local/bin)
13 AC_PATH_PROG(CHMOD, chmod, /bin/chmod, $PATH:/bin:/usr/bin:/usr/local/bin)
18 dnl Add warning flags if we are using gcc.
19 if test "$GCC" = yes; then
20 fastjar_warn_cflags='-W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings'
22 AC_SUBST(fastjar_warn_cflags)
24 dnl Checks for header files.
28 AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h)
30 AC_CHECK_FUNCS(ftruncate _chsize)
32 dnl Checks for typedefs, structures, and compiler characteristics.
36 # mkdir takes a single argument on some systems.
37 gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
39 dnl Check for type-widths
41 AC_CHECK_SIZEOF(short)
44 AC_CHECK_TYPES([long long],[AC_CHECK_SIZEOF(long long)])
49 AC_ARG_WITH(system-zlib,
50 [ --with-system-zlib use installed libz])
56 if test "$with_system_zlib" = yes; then
57 AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no)
62 if test "$use_zlib" = no; then
63 # Brain dead way to find tree's zlib.
64 ZDEPS='$(top_builddir)/../zlib/libz.a'
65 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
66 ZINCS='-I$(top_srcdir)/../zlib'
73 # We would like to our source tree to be readonly. However when releases or
74 # pre-releases are generated, the man pages need to be included as they are
75 # converted from the texi files via perl which we don't require end users to
77 # Therefore we have --enable-generated-files-in-srcdir to do just that.
79 AC_MSG_CHECKING([whether to place generated files in the source directory])
80 dnl generated-files-in-srcdir is disabled by default
81 AC_ARG_ENABLE(generated-files-in-srcdir,
82 [ --enable-generated-files-in-srcdir
83 put copies of generated files in source dir
84 intended for creating source tarballs for users
85 without texinfo, perl, bison or flex.],
86 generated_files_in_srcdir=$enableval,
87 generated_files_in_srcdir=no)
89 AC_MSG_RESULT($generated_files_in_srcdir)
90 AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes)
92 AC_OUTPUT(Makefile install-defs.sh)