1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
|
dnl
dnl $Id: configure.in,v 1.16 2005/06/18 19:41:05 andrew_belov Exp $
dnl --------------------------------------------------------------------------
dnl This file performs setup of GNU-style makefiles.
dnl
AC_INIT([arj])
AC_PREREQ(2.53)
AC_CONFIG_SRCDIR([../arj.c])
dnl Installation script (let it be, temporarily...)
AC_PROG_INSTALL([e:/os2apps/autoconf/install-sh])
dnl Configuration parameters
AC_CONFIG_HEADER([../c_defs.h:config.h.in])
dnl Checks for the canonical system name
AC_CANONICAL_HOST
AS_IF([test "$host" != "$build"], [
AC_SUBST([CROSS_BUILDING], [yes])
])
CC_FOR_BUILD=${CC_FOR_BUILD:-gcc}
AC_SUBST([CC_FOR_BUILD])
dnl Checks for programs.
AC_PROG_CC
AC_CHECK_TOOL([STRIP], [strip])
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_STRUCT_TM
AC_C_BIGENDIAN
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([getcwd min max mkdir mkdtemp rmdir fcloseall \
strcasecmp setpriority strdup strerror strstr strnlen \
strupr strlwr strtol strtoul])
dnl Platform-specific tuning
PROG_EXT=
DLL_EXT=".so"
DLL_FLAGS="-shared"
REQUIRES_DEF=
OS_ID="UNIX"
OS_DEF="-D_UNIX"
DLL_CFLAGS="-fPIC"
case $host_os in
gnu*|linux*|k*bsd*)
AC_DEFINE(ELF_EXECUTABLES, 1, [Define if executables use ELF format])
DYN_LIBS="-ldl"
DLL_FLAGS="-shared -fPIC"
DLL_CFLAGS="-fPIC"
LD_STRIP="gnu/stripgcc.lnk"
;;
*bsd*)
AC_DEFINE(ELF_EXECUTABLES)
DLL_FLAGS="-shared -export-dynamic"
LD_STRIP="gnu/stripgcc.lnk"
;;
interix3*)
# not ELF
DLL_FLAGS="-shared"
DLL_CFLAGS=""
;;
*qnx*)
AC_DEFINE(ELF_EXECUTABLES)
DLL_FLAGS="-shared -fPIC"
DLL_CFLAGS="-shared -fPIC"
LD_STRIP="gnu/stripgcc.lnk"
;;
*solaris*)
AC_DEFINE(ELF_EXECUTABLES)
CFLAGS="-DSUNOS -D_UNIX"
DLL_FLAGS="-shared -fPIC"
DLL_CFLAGS="-shared -fPIC"
LD_STRIP="gnu/stripgcc.lnk"
;;
os2*)
PROG_EXT=".exe"
DLL_EXT=".dll"
LDFLAGS="-s"
DLL_FLAGS="-Zdll -s"
DLL_CFLAGS=""
REQUIRES_DEF=1
OS_ID="OS2"
OS_DEF="-D_OS2"
;;
esac
AC_SUBST([LDFLAGS_FOR_BUILD])
OS_DEF_FOR_BUILD="-D_UNIX"
case $build_os in
gnu*|linux*|*bsd*|interix3*|*qnx*|*solaris*)
;;
os2*)
LDFLAGS_FOR_BUILD="-s"
OS_DEF_FOR_BUILD="-D_OS2"
;;
esac
case $host_cpu in
alpha*)
AC_DEFINE(ALIGN_POINTERS, 1, [Define if pointers need to be aligned])
;;
sparc*)
AC_DEFINE(ALIGN_POINTERS)
;;
ia64*)
AC_DEFINE(ALIGN_POINTERS)
;;
arm*)
AC_DEFINE(ALIGN_POINTERS)
;;
hppa*)
AC_DEFINE(ALIGN_POINTERS)
;;
esac
dnl Registration wizard is named "arj-register" under UNIX-like platforms, to
dnl give it a unique name
case $host_os in
os2*)
REGISTER=register
;;
*)
REGISTER=arj-register
esac
dnl Initial setup
test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
AC_SUBST(CONFIG_SHELL)
AC_MSG_CHECKING([if dynamic C library may be used])
AC_ARG_ENABLE(libc,
[ --disable-libc Disable linking with dynamic C library],
[enable_libc=no],
[enable_libc=yes
case $host_os in
os2*)
LDFLAGS="-Zcrtdll $LDFLAGS"
DLL_FLAGS="-Zcrtdll $DLL_FLAGS"
esac
case $build_os in
os2*)
LDFLAGS_FOR_BUILD="-Zcrtdll $LDFLAGS_FOR_BUILD"
esac
])
AC_MSG_RESULT($enable_libc)
test "$enable_libc" != "no" && AC_DEFINE(LIBC, 1, [Define if dynamic C library may be used])
AC_MSG_CHECKING([if SFX executables may be packed])
AC_ARG_ENABLE(packsfx,
[ --disable-packsfx Force disable packing of SFX modules],
[packsfx=no],
[packsfx=yes])
AC_MSG_RESULT($packsfx)
test "$packsfx" != "yes" && AC_DEFINE(NP_SFX, 1, [Define if SFX executables may be packed])
AC_MSG_CHECKING([what to use as a dedicated output directory])
AC_ARG_ENABLE(outdir,
[ --enable-outdir Specify a dedicated output directory],
[OUT_DIR=$enableval],
[OUT_DIR=$host_os])
AC_MSG_RESULT($OUT_DIR)
AC_SUBST(OUT_DIR)
AC_MSG_CHECKING([fnmatch() tolerance to incomplete patterns acting as filenames])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <fnmatch.h>
]], [[
int main()
{
return(fnmatch("@<:@", "@<:@", 0)); /* Must return 0 for a valid match */
}
]])], [TOLERANT_FNMATCH=yes], [TOLERANT_FNMATCH=no], [TOLERANT_FNMATCH=cross])
if test x$TOLERANT_FNMATCH = xyes ; then
AC_DEFINE(TOLERANT_FNMATCH, 1, [Trust fnmatch() when supplying incomplete patterns])
fi
AC_MSG_RESULT([$TOLERANT_FNMATCH])
dnl Experimental feature(s)
AC_MSG_CHECKING([if color output is demanded])
AC_ARG_ENABLE(color-output,
[ --enable-color-output Enable JAR-style color output (EXPERIMENTAL)],
[color_output=yes],
[color_output=no])
AC_MSG_RESULT($color_output)
test "$color_output" = "yes" && AC_DEFINE(USE_COLORS, 1, [Define if colors should be used])
AC_SUBST(HAVE_MKDTEMP)
AC_SUBST(HAVE_FCLOSEALL)
AC_SUBST(HAVE_STRCASECMP)
AC_SUBST(HAVE_SETPRIORITY)
AC_SUBST(HAVE_STRUPR)
AC_SUBST(HAVE_STRLWR)
AC_SUBST(PROG_EXT)
AC_SUBST(DLL_EXT)
AC_SUBST(DLL_FLAGS)
AC_SUBST(DLL_CFLAGS)
AC_SUBST(REQUIRES_DEF)
AC_SUBST(OS_ID)
AC_SUBST(OS_DEF)
AC_SUBST(OS_DEF_FOR_BUILD)
AC_SUBST(LIBS)
AC_SUBST(DYN_LIBS)
AC_SUBST(LD_STRIP)
AC_SUBST(REGISTER)
AC_SUBST(TOLERANT_FNMATCH)
AC_CONFIG_FILES([../GNUmakefile:makefile.in])
AC_OUTPUT
|