mirror of
https://github.com/nmap/nmap.git
synced 2025-12-26 01:19:03 +00:00
get rid of silly top-level trunk dir
This commit is contained in:
156
libpcre/configure.ac
Normal file
156
libpcre/configure.ac
Normal file
@@ -0,0 +1,156 @@
|
||||
dnl This has been stripped down a bit by fyodor@insecure.org for
|
||||
dnl inclusion in Nmap (removed libtool and dynamic library stuff)
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl This is required at the start; the name is the name of a file
|
||||
dnl it should be seeing, to verify it is in the same directory.
|
||||
|
||||
AC_INIT(dftables.c)
|
||||
|
||||
dnl A safety precaution
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
|
||||
dnl Arrange to build config.h from config.in. Note that pcre.h is
|
||||
dnl built differently, as it is just a "substitution" file.
|
||||
dnl Manual says this macro should come right after AC_INIT.
|
||||
AC_CONFIG_HEADER(config.h:config.in)
|
||||
|
||||
dnl Provide the current PCRE version information. Do not use numbers
|
||||
dnl with leading zeros for the minor version, as they end up in a C
|
||||
dnl macro, and may be treated as octal constants. Stick to single
|
||||
dnl digits for minor numbers less than 10. There are unlikely to be
|
||||
dnl that many releases anyway.
|
||||
|
||||
PCRE_MAJOR=4
|
||||
PCRE_MINOR=3
|
||||
PCRE_DATE=21-May-2003
|
||||
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
|
||||
|
||||
dnl Default values for miscellaneous macros
|
||||
|
||||
POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=10
|
||||
|
||||
dnl Provide versioning information for libtool shared libraries that
|
||||
dnl are built by default on Unix systems.
|
||||
|
||||
PCRE_LIB_VERSION=0:1:0
|
||||
PCRE_POSIXLIB_VERSION=0:0:0
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl We need to find a compiler for compiling a program to run on the local host
|
||||
dnl while building. It needs to be different from CC when cross-compiling.
|
||||
dnl There is a macro called AC_PROG_CC_FOR_BUILD in the GNU archive for
|
||||
dnl figuring this out automatically. Unfortunately, it does not work with the
|
||||
dnl latest versions of autoconf. So for the moment, we just default to the
|
||||
dnl same values as the "main" compiler. People who are corss-compiling will
|
||||
dnl just have to adjust the Makefile by hand or set these values when they
|
||||
dnl run "configure".
|
||||
|
||||
CC_FOR_BUILD=${CC_FOR_BUILD:-'$(CC)'}
|
||||
CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:-'$(CFLAGS)'}
|
||||
BUILD_EXEEXT=${BUILD_EXEEXT:-'$(EXEEXT)'}
|
||||
BUILD_OBJEXT=${BUILD_OBJEXT:-'$(OBJEXT)'}
|
||||
|
||||
dnl Checks for header files.
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(limits.h)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
dnl Checks for library functions.
|
||||
|
||||
AC_CHECK_FUNCS(bcopy memmove strerror)
|
||||
|
||||
dnl Handle --enable-utf8
|
||||
|
||||
AC_ARG_ENABLE(utf8,
|
||||
[ --enable-utf8 enable UTF8 support],
|
||||
if test "$enableval" = "yes"; then
|
||||
UTF8=-DSUPPORT_UTF8
|
||||
fi
|
||||
)
|
||||
|
||||
dnl Handle --enable-newline-is-cr
|
||||
|
||||
AC_ARG_ENABLE(newline-is-cr,
|
||||
[ --enable-newline-is-cr use CR as the newline character],
|
||||
if test "$enableval" = "yes"; then
|
||||
NEWLINE=-DNEWLINE=13
|
||||
fi
|
||||
)
|
||||
|
||||
dnl Handle --enable-newline-is-lf
|
||||
|
||||
AC_ARG_ENABLE(newline-is-lf,
|
||||
[ --enable-newline-is-lf use LF as the newline character],
|
||||
if test "$enableval" = "yes"; then
|
||||
NEWLINE=-DNEWLINE=10
|
||||
fi
|
||||
)
|
||||
|
||||
dnl There doesn't seem to be a straightforward way of having parameters
|
||||
dnl that set values, other than fudging the --with thing. So that's what
|
||||
dnl I've done.
|
||||
|
||||
dnl Handle --with-posix-malloc-threshold=n
|
||||
|
||||
AC_ARG_WITH(posix-malloc-threshold,
|
||||
[ --with-posix-malloc-threshold=5 threshold for POSIX malloc usage],
|
||||
POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=$withval
|
||||
)
|
||||
|
||||
dnl Handle --with-link-size=n
|
||||
|
||||
AC_ARG_WITH(link-size,
|
||||
[ --with-link-size=2 internal link size (2, 3, or 4 allowed)],
|
||||
LINK_SIZE=-DLINK_SIZE=$withval
|
||||
)
|
||||
|
||||
dnl Handle --with-match_limit=n
|
||||
|
||||
AC_ARG_WITH(match-limit,
|
||||
[ --with-match-limit=10000000 default limit on internal looping)],
|
||||
MATCH_LIMIT=-DMATCH_LIMIT=$withval
|
||||
)
|
||||
|
||||
dnl "Export" these variables
|
||||
|
||||
AC_SUBST(BUILD_EXEEXT)
|
||||
AC_SUBST(BUILD_OBJEXT)
|
||||
AC_SUBST(CC_FOR_BUILD)
|
||||
AC_SUBST(CFLAGS_FOR_BUILD)
|
||||
AC_SUBST(HAVE_MEMMOVE)
|
||||
AC_SUBST(HAVE_STRERROR)
|
||||
AC_SUBST(LINK_SIZE)
|
||||
AC_SUBST(MATCH_LIMIT)
|
||||
AC_SUBST(NEWLINE)
|
||||
AC_SUBST(PCRE_MAJOR)
|
||||
AC_SUBST(PCRE_MINOR)
|
||||
AC_SUBST(PCRE_DATE)
|
||||
AC_SUBST(PCRE_VERSION)
|
||||
AC_SUBST(PCRE_LIB_VERSION)
|
||||
AC_SUBST(PCRE_POSIXLIB_VERSION)
|
||||
AC_SUBST(POSIX_MALLOC_THRESHOLD)
|
||||
AC_SUBST(UTF8)
|
||||
|
||||
|
||||
AC_SUBST(POSIX_OBJ)
|
||||
AC_SUBST(POSIX_LOBJ)
|
||||
AC_SUBST(POSIX_LIB)
|
||||
|
||||
if test "x$enable_shared" = "xno" ; then
|
||||
AC_DEFINE(PCRE_STATIC,1)
|
||||
fi
|
||||
|
||||
dnl This must be last; it determines what files are written as well as config.h
|
||||
AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config:pcre-config.in,[chmod a+x pcre-config])
|
||||
Reference in New Issue
Block a user