]>
Commit | Line | Data |
---|---|---|
bd8757b3 | 1 | dnl Process this file with autoconf to produce a configure script. |
8ab705be | 2 | AC_PREREQ(2.59) |
bd8757b3 | 3 | AC_INIT(jartool.h) |
7a93476d | 4 | AM_INIT_AUTOMAKE(fastjar, 0.92-gcc) |
bd8757b3 APB |
5 | AM_CONFIG_HEADER(config.h) |
6 | ||
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) | |
645ca343 | 14 | AC_EXEEXT |
bd8757b3 | 15 | |
7a93476d TT |
16 | AM_MAINTAINER_MODE |
17 | ||
37729557 KG |
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' | |
21 | fi | |
22 | AC_SUBST(fastjar_warn_cflags) | |
23 | ||
bd8757b3 APB |
24 | dnl Checks for header files. |
25 | AC_HEADER_DIRENT | |
26 | AC_HEADER_STDC | |
27 | AC_STRUCT_TM | |
9d8f417b | 28 | AC_CHECK_HEADERS(fcntl.h unistd.h sys/param.h stdlib.h limits.h) |
bd8757b3 APB |
29 | |
30 | dnl Checks for typedefs, structures, and compiler characteristics. | |
31 | AC_TYPE_OFF_T | |
32 | AC_STRUCT_TM | |
33 | ||
b4258f06 RM |
34 | # mkdir takes a single argument on some systems. |
35 | gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG | |
36 | ||
bd8757b3 | 37 | dnl Check for type-widths |
4977bab6 ZW |
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_COMPILE_CHECK_SIZEOF(long long) | |
bd8757b3 APB |
43 | |
44 | dnl Check byte order | |
4977bab6 | 45 | AC_C_BIGENDIAN_CROSS |
bd8757b3 | 46 | |
d475215a TT |
47 | AC_ARG_WITH(system-zlib, |
48 | [ --with-system-zlib use installed libz]) | |
49 | ||
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 | |
58 | fi | |
59 | ||
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' | |
65 | fi | |
bd8757b3 APB |
66 | AC_SUBST(ZLIBS) |
67 | AC_SUBST(ZDEPS) | |
68 | AC_SUBST(ZINCS) | |
69 | ||
040e098a KC |
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. | |
76 | ||
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) | |
86 | ||
87 | AC_MSG_RESULT($generated_files_in_srcdir) | |
88 | AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes) | |
89 | ||
42ac7b6d MK |
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 | |
95 | fi | |
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) | |
101 | ||
bd8757b3 | 102 | AC_OUTPUT(Makefile install-defs.sh) |