darwin.h (ASM_OUTPUT_LABELREF): Fix -fno-leading-underscore.
[official-gcc.git] / fastjar / configure.ac
blob635836fd882d2cdfeedf584e57f4c19a640ebbbf
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.59)
3 AC_INIT(jartool.h)
4 AM_INIT_AUTOMAKE(fastjar, 0.92-gcc)
5 AM_CONFIG_HEADER(config.h)
7 dnl Checks for programs.
8 AC_PROG_CC
9 AC_PROG_INSTALL
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)
14 AC_EXEEXT
16 AM_MAINTAINER_MODE
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.
25 AC_HEADER_DIRENT
26 AC_HEADER_STDC
27 AC_STRUCT_TM
28 AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h)
30 dnl Checks for typedefs, structures, and compiler characteristics.
31 AC_TYPE_OFF_T
32 AC_STRUCT_TM
34 # mkdir takes a single argument on some systems.
35 gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
37 dnl Check for type-widths
38 AC_COMPILE_CHECK_SIZEOF(char)
39 AC_COMPILE_CHECK_SIZEOF(short)
40 AC_COMPILE_CHECK_SIZEOF(int)
41 AC_COMPILE_CHECK_SIZEOF(long)
42 AC_CHECK_TYPES([long long],[AC_COMPILE_CHECK_SIZEOF(long long)])
44 dnl Check byte order
45 AC_C_BIGENDIAN_CROSS
47 AC_ARG_WITH(system-zlib,
48 [  --with-system-zlib      use installed libz])
50 ZLIBS=
51 ZDEPS=
52 ZINCS=
53 use_zlib=maybe
54 if test "$with_system_zlib" = yes; then
55    AC_CHECK_LIB(z, deflate, ZLIBS=-lz, use_zlib=no)
56 else
57    use_zlib=no
60 if test "$use_zlib" = no; then
61    # Brain dead way to find tree's zlib.
62    ZDEPS='$(top_builddir)/../zlib/libz.a'
63    ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
64    ZINCS='-I$(top_srcdir)/../zlib'
66 AC_SUBST(ZLIBS)
67 AC_SUBST(ZDEPS)
68 AC_SUBST(ZINCS)
70 # GCC LOCAL CHANGE
71 # We would like to our source tree to be readonly.  However when releases or
72 # pre-releases are generated, the man pages need to be included as they are
73 # converted from the texi files via perl which we don't require end users to
74 # have installed.
75 # Therefore we have --enable-generated-files-in-srcdir to do just that.
77 AC_MSG_CHECKING([whether to place generated files in the source directory])
78   dnl generated-files-in-srcdir is disabled by default
79   AC_ARG_ENABLE(generated-files-in-srcdir, 
80 [  --enable-generated-files-in-srcdir
81                           put copies of generated files in source dir
82                           intended for creating source tarballs for users
83                           without texinfo, perl, bison or flex.],
84       generated_files_in_srcdir=$enableval,
85       generated_files_in_srcdir=no)
87 AC_MSG_RESULT($generated_files_in_srcdir)
88 AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes)
90 # Get the version trigger filename from the toplevel
91 if test "${with_gcc_version_trigger+set}" = set; then
92    gcc_version_trigger=$with_gcc_version_trigger
93 else
94    gcc_version_trigger=${srcdir}/version.c
96 changequote(,)dnl
97 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
98 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
99 changequote([,])dnl
100 AC_SUBST(gcc_version)
102 AC_OUTPUT(Makefile install-defs.sh)