[b4a676] | 1 | AC_INIT([libfindexec], [3.1.4.sw]) |
---|
| 2 | |
---|
| 3 | AC_CONFIG_MACRO_DIR([../m4]) |
---|
| 4 | AC_CONFIG_AUX_DIR([.]) |
---|
| 5 | AC_CONFIG_SRCDIR([omFindExec.h]) |
---|
| 6 | AC_CONFIG_HEADER([config.h]) |
---|
| 7 | |
---|
| 8 | AM_MAINTAINER_MODE |
---|
[24a77fb] | 9 | AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules |
---|
[b4a676] | 10 | |
---|
| 11 | dnl Check if build env is sane |
---|
| 12 | AM_SANITY_CHECK |
---|
| 13 | |
---|
| 14 | # |
---|
| 15 | # - Check for CC and CXX but be careful about CFLAGS. |
---|
| 16 | # |
---|
| 17 | test "${CFLAGS+set}" = set || cflags_expl_set=no |
---|
| 18 | AC_PROG_CC |
---|
| 19 | test "${CXXFLAGS+set}" = set || cxxflags_expl_set=no |
---|
| 20 | AC_PROG_CXX |
---|
| 21 | if test "x$GCC" != xyes && test "x$GXX" != xyes; then |
---|
| 22 | AC_MSG_WARN(you better use gcc to compile Factory) |
---|
| 23 | else |
---|
| 24 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
| 25 | AC_MSG_WARN([we use \`' as default for \`CXXFLAGS' |
---|
| 26 | (instead of the configure default \`-g -O')]) |
---|
| 27 | fi |
---|
| 28 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
| 29 | AC_MSG_WARN([we use \`' as default for \`CFLAGS' |
---|
| 30 | (instead of the configure default \`-g -O')]) |
---|
| 31 | fi |
---|
| 32 | fi |
---|
| 33 | |
---|
| 34 | AM_PROG_CC_C_O |
---|
[e078e0] | 35 | # AM_PROG_AR |
---|
| 36 | |
---|
[b4a676] | 37 | AC_PROG_LN_S |
---|
| 38 | AC_PROG_INSTALL |
---|
| 39 | |
---|
| 40 | AC_FUNC_MALLOC |
---|
| 41 | AC_HEADER_STDC |
---|
| 42 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h sys/param.h sys/stat.h sys/types.h]) |
---|
[24db42] | 43 | AC_CHECK_FUNCS(readlink getcwd getwd getpwnam setenv putenv) |
---|
[b4a676] | 44 | |
---|
| 45 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 46 | AC_C_CONST |
---|
| 47 | AC_C_INLINE |
---|
| 48 | AC_HEADER_STDBOOL |
---|
| 49 | AC_TYPE_SIZE_T |
---|
| 50 | |
---|
[e078e0] | 51 | # Turn off shared libraries during beta-testing, since they |
---|
| 52 | # make the build process take too long. |
---|
| 53 | LT_INIT |
---|
| 54 | # ([shared]) |
---|
| 55 | # LT_INIT(dlopen disable-static) # doesn't work on PowerPC! |
---|
| 56 | |
---|
[b4a676] | 57 | |
---|
| 58 | SING_CHECK_PIPE |
---|
| 59 | |
---|
[f284db] | 60 | AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]), |
---|
[2b43ac] | 61 | [if test "x$enableval" = "xyes"; then |
---|
| 62 | ENABLE_DEBUG=yes |
---|
| 63 | fi], ENABLE_DEBUG=no) |
---|
| 64 | |
---|
| 65 | AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) |
---|
| 66 | |
---|
[b4a676] | 67 | |
---|
| 68 | # CFLAGS |
---|
| 69 | if test "x$GCC" = xyes && test "x$cflags_expl_set" = xno; then |
---|
| 70 | CFLAGS="" |
---|
| 71 | fi |
---|
| 72 | |
---|
| 73 | # CXXFLAGS |
---|
| 74 | if test "x$GXX" = xyes && test "x$cxxflags_expl_set" = xno; then |
---|
| 75 | CXXFLAGS="" |
---|
| 76 | fi |
---|
| 77 | |
---|
| 78 | AC_CONFIG_FILES([Makefile]) |
---|
| 79 | AC_OUTPUT |
---|