configure.ac (296373) | configure.ac (330569) |
---|---|
1dnl Process this file with autoconf to produce a configure script. | 1dnl Process this file with autoconf to produce a configure script. |
2AC_INIT([file],[5.25],[christos@astron.com]) | 2AC_INIT([file],[5.32],[christos@astron.com]) |
3AM_INIT_AUTOMAKE([subdir-objects foreign]) 4m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 5 6AC_CONFIG_HEADERS([config.h]) 7AC_CONFIG_MACRO_DIR([m4]) 8 9AC_MSG_CHECKING(for builtin ELF support) 10AC_ARG_ENABLE(elf, --- 18 unchanged lines hidden (view full) --- 29else 30 AC_MSG_RESULT(no) 31fi], [ 32 # enable by default 33 AC_MSG_RESULT(yes) 34 AC_DEFINE([ELFCORE], 1, [Define for ELF core file support]) 35]) 36 | 3AM_INIT_AUTOMAKE([subdir-objects foreign]) 4m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 5 6AC_CONFIG_HEADERS([config.h]) 7AC_CONFIG_MACRO_DIR([m4]) 8 9AC_MSG_CHECKING(for builtin ELF support) 10AC_ARG_ENABLE(elf, --- 18 unchanged lines hidden (view full) --- 29else 30 AC_MSG_RESULT(no) 31fi], [ 32 # enable by default 33 AC_MSG_RESULT(yes) 34 AC_DEFINE([ELFCORE], 1, [Define for ELF core file support]) 35]) 36 |
37AC_MSG_CHECKING(for zlib support) 38AC_ARG_ENABLE(zlib, 39[AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])]) 40AC_MSG_RESULT($enable_zlib) 41 |
|
37AC_MSG_CHECKING(for file formats in man section 5) 38AC_ARG_ENABLE(fsect-man5, 39[ --enable-fsect-man5 enable file formats in man section 5], 40[if test "${enableval}" = yes; then 41 AC_MSG_RESULT(yes) 42 fsect=5 43else 44 AC_MSG_RESULT(no) --- 34 unchanged lines hidden (view full) --- 79dnl Checks for headers 80AC_HEADER_STDC 81AC_HEADER_MAJOR 82AC_HEADER_SYS_WAIT 83AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h) 84AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) 85AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h) 86AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) | 42AC_MSG_CHECKING(for file formats in man section 5) 43AC_ARG_ENABLE(fsect-man5, 44[ --enable-fsect-man5 enable file formats in man section 5], 45[if test "${enableval}" = yes; then 46 AC_MSG_RESULT(yes) 47 fsect=5 48else 49 AC_MSG_RESULT(no) --- 34 unchanged lines hidden (view full) --- 84dnl Checks for headers 85AC_HEADER_STDC 86AC_HEADER_MAJOR 87AC_HEADER_SYS_WAIT 88AC_CHECK_HEADERS(stdint.h fcntl.h locale.h stdint.h inttypes.h unistd.h) 89AC_CHECK_HEADERS(stddef.h utime.h wchar.h wctype.h limits.h) 90AC_CHECK_HEADERS(getopt.h err.h xlocale.h signal.h) 91AC_CHECK_HEADERS(sys/mman.h sys/stat.h sys/types.h sys/utime.h sys/time.h) |
87AC_CHECK_HEADERS(zlib.h) | 92if test "$enable_zlib" != "no"; then 93 AC_CHECK_HEADERS(zlib.h) 94fi |
88AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[ 89#ifdef HAVE_SIGNAL_H 90#include <signal.h> 91#endif]) 92 93dnl Checks for typedefs, structures, and compiler characteristics. 94AC_C_CONST 95AC_TYPE_OFF_T --- 44 unchanged lines hidden (view full) --- 140 WARNINGS= 141 AC_MSG_RESULT(no) 142fi]) 143 144dnl Checks for functions 145AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale) 146 147dnl Provide implementation of some required functions if necessary | 95AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[ 96#ifdef HAVE_SIGNAL_H 97#include <signal.h> 98#endif]) 99 100dnl Checks for typedefs, structures, and compiler characteristics. 101AC_C_CONST 102AC_TYPE_OFF_T --- 44 unchanged lines hidden (view full) --- 147 WARNINGS= 148 AC_MSG_RESULT(no) 149fi]) 150 151dnl Checks for functions 152AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof newlocale uselocale freelocale setlocale) 153 154dnl Provide implementation of some required functions if necessary |
148AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck) | 155AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r localtime_r gmtime_r pread strcasestr fmtcheck dprintf) |
149 150dnl Checks for libraries | 156 157dnl Checks for libraries |
151AC_CHECK_LIB(z,gzopen) | 158if test "$enable_zlib" != "no"; then 159 AC_CHECK_LIB(z, gzopen) 160fi |
152if test "$MINGW" = 1; then 153 AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW])) 154fi 155 156dnl See if we are cross-compiling 157AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes) 158 | 161if test "$MINGW" = 1; then 162 AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW])) 163fi 164 165dnl See if we are cross-compiling 166AM_CONDITIONAL(IS_CROSS_COMPILE, test "$cross_compiling" = yes) 167 |
168dnl Final sanity checks 169if test "$enable_zlib" = "yes"; then 170 if test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" != "yesyes"; then 171 AC_MSG_ERROR([zlib support requested but not found]) 172 fi 173elif test "$ac_cv_header_zlib_h$ac_cv_lib_z_gzopen" = "yesyes"; then 174 AC_DEFINE([ZLIBSUPPORT], 1, [Enable zlib compression support]) 175fi 176 |
|
159AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) 160AC_OUTPUT | 177AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) 178AC_OUTPUT |