mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Opens space for libmodsecurity
Deletes all files in the repository does not seems to be a good idea. The better approach will be to create a new repository. On other hand we don't want this to be detached from this main repository. We can push this to other repository if necessary.
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
#!@SHELL@
|
||||
|
||||
WRAPPED_OPTS=""
|
||||
for opt in "$@"; do
|
||||
case "$opt" in
|
||||
# Fix for -R not working w/apxs
|
||||
-R*) WRAPPED_OPTS="$WRAPPED_OPTS -Wl,$opt" ;;
|
||||
# OSF1 compiler option
|
||||
-pthread) WRAPPED_OPTS="$WRAPPED_OPTS -Wc,$opt" ;;
|
||||
# Unwrapped
|
||||
*) WRAPPED_OPTS="$WRAPPED_OPTS $opt" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
exec @APXS@ $WRAPPED_OPTS
|
142
build/compile
142
build/compile
@@ -1,142 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand `-c -o'.
|
||||
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file `INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
eat=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we strip `-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
@@ -1,91 +0,0 @@
|
||||
dnl Check for APR Libraries
|
||||
dnl CHECK_APR(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl APR_CFLAGS
|
||||
dnl APR_LDFLAGS
|
||||
dnl APR_LIBS
|
||||
dnl APR_LINK_LD
|
||||
|
||||
APR_CONFIG=""
|
||||
APR_CFLAGS=""
|
||||
APR_CPPFLAGS=""
|
||||
APR_LDFLAGS=""
|
||||
APR_LDADD=""
|
||||
APR_INCLUDEDIR=""
|
||||
APR_LINKLD=""
|
||||
AC_DEFUN([CHECK_APR],
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(
|
||||
apr,
|
||||
[AC_HELP_STRING([--with-apr=PATH],[Path to apr prefix or config script])],
|
||||
[test_paths="${with_apr}"],
|
||||
[test_paths="/usr/local/libapr /usr/local/apr /usr/local /opt/libapr /opt/apr /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libapr config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
APR_CONFIG=$x
|
||||
apr_path=no
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for APR_CONFIG in apr-1-mt-config apr-1-config apr-config-1 apr-mt-config-1 apr-mt-config apr-config; do
|
||||
if test -e "${x}/bin/${APR_CONFIG}"; then
|
||||
apr_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${APR_CONFIG}"; then
|
||||
apr_path="${x}"
|
||||
break
|
||||
else
|
||||
apr_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$apr_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${apr_path}"; then
|
||||
if test "${apr_path}" != "no"; then
|
||||
APR_CONFIG="${apr_path}/${APR_CONFIG}"
|
||||
fi
|
||||
AC_MSG_RESULT([${APR_CONFIG}])
|
||||
APR_VERSION="`${APR_CONFIG} --version`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr VERSION: $APR_VERSION); fi
|
||||
APR_CFLAGS="`${APR_CONFIG} --includes`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr CFLAGS: $APR_CFLAGS); fi
|
||||
APR_CPPFLAGS="`${APR_CONFIG} --cppflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr CPPFLAGS: $APR_CPPFLAGS); fi
|
||||
APR_LDFLAGS="`${APR_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr LDFLAGS: $APR_LDFLAGS); fi
|
||||
APR_LDADD="`${APR_CONFIG} --link-libtool`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr LDADD: $APR_LDADD); fi
|
||||
APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr INCLUDEDIR: $APR_INCLUDEDIR); fi
|
||||
APR_LINKLD="`${APR_CONFIG} --link-ld`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr LINKLD: $APR_LINKLD); fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(APR_CONFIG)
|
||||
AC_SUBST(APR_VERSION)
|
||||
AC_SUBST(APR_CFLAGS)
|
||||
AC_SUBST(APR_CPPFLAGS)
|
||||
AC_SUBST(APR_LDFLAGS)
|
||||
AC_SUBST(APR_LDADD)
|
||||
AC_SUBST(APR_INCLUDEDIR)
|
||||
AC_SUBST(APR_LINKLD)
|
||||
|
||||
if test -z "${APR_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** apr library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([apr library is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using apr v${APR_VERSION}])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
@@ -1,89 +0,0 @@
|
||||
dnl Check for APU Libraries
|
||||
dnl CHECK_APU(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl APU_CFLAGS
|
||||
dnl APU_LDFLAGS
|
||||
dnl APU_LIBS
|
||||
dnl APU_LINK_LD
|
||||
|
||||
APU_CONFIG=""
|
||||
APU_CFLAGS=""
|
||||
APU_LDFLAGS=""
|
||||
APU_LDADD=""
|
||||
APU_INCLUDEDIR=""
|
||||
APU_LINKLD=""
|
||||
|
||||
AC_DEFUN([CHECK_APU],
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(
|
||||
apu,
|
||||
[AC_HELP_STRING([--with-apu=PATH],[Path to apu prefix or config script])],
|
||||
[test_paths="${with_apu}"],
|
||||
[test_paths="/usr/local/libapr-util /usr/local/apr-util /usr/local/libapu /usr/local/apu /usr/local/apr /usr/local /opt/libapr-util /opt/apr-util /opt/libapu /opt/apu /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libapu config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
APU_CONFIG=$x
|
||||
apu_path="no"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for APU_CONFIG in apu-1-mt-config apu-1-config apu-config-1 apu-mt-config-1 apu-mt-config apu-config; do
|
||||
if test -e "${x}/bin/${APU_CONFIG}"; then
|
||||
apu_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${APU_CONFIG}"; then
|
||||
apu_path="${x}"
|
||||
break
|
||||
else
|
||||
apu_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$apu_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${apu_path}"; then
|
||||
if test "${apu_path}" != "no"; then
|
||||
APU_CONFIG="${apu_path}/${APU_CONFIG}"
|
||||
fi
|
||||
AC_MSG_RESULT([${APU_CONFIG}])
|
||||
APU_VERSION="`${APU_CONFIG} --version`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu VERSION: $APU_VERSION); fi
|
||||
APU_CFLAGS="`${APU_CONFIG} --includes`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu CFLAGS: $APU_CFLAGS); fi
|
||||
APU_LDFLAGS="`${APU_CONFIG} --ldflags`"
|
||||
APU_LDFLAGS="$APU_LDFLAGS `${APU_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LDFLAGS: $APU_LDFLAGS); fi
|
||||
APU_LDADD="`${APU_CONFIG} --link-libtool`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LDADD: $APU_LDADD); fi
|
||||
APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu INCLUDEDIR: $APU_INCLUDEDIR); fi
|
||||
APU_LINKLD="`${APU_CONFIG} --link-ld`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LINKLD: $APU_LINKLD); fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(APU_CONFIG)
|
||||
AC_SUBST(APU_VERSION)
|
||||
AC_SUBST(APU_CFLAGS)
|
||||
AC_SUBST(APU_LDFLAGS)
|
||||
AC_SUBST(APU_LDADD)
|
||||
AC_SUBST(APU_INCLUDEDIR)
|
||||
AC_SUBST(APU_LINKLD)
|
||||
|
||||
if test -z "${APU_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** apu library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([apu library is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using apu v${APU_VERSION}])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
@@ -1,110 +0,0 @@
|
||||
dnl Check for CURL Libraries
|
||||
dnl CHECK_CURL(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl CURL_CFLAGS
|
||||
dnl CURL_LIBS
|
||||
|
||||
CURL_CONFIG=""
|
||||
CURL_VERSION=""
|
||||
CURL_CPPFLAGS=""
|
||||
CURL_CFLAGS=""
|
||||
CURL_LDFLAGS=""
|
||||
CURL_LDADD=""
|
||||
CURL_MIN_VERSION="7.15.1"
|
||||
|
||||
AC_DEFUN([CHECK_CURL],
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(
|
||||
curl,
|
||||
[AC_HELP_STRING([--with-curl=PATH],[Path to curl prefix or config script])],
|
||||
[test_paths="${with_curl}"],
|
||||
[test_paths="/usr/local/libcurl /usr/local/curl /usr/local /opt/libcurl /opt/curl /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libcurl config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
CURL_CONFIG=$x
|
||||
curl_path="no"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for CURL_CONFIG in curl-config; do
|
||||
if test -e "${x}/bin/${CURL_CONFIG}"; then
|
||||
curl_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${CURL_CONFIG}"; then
|
||||
curl_path="${x}"
|
||||
break
|
||||
else
|
||||
curl_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$curl_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${curl_path}"; then
|
||||
if test "${curl_path}" != "no"; then
|
||||
CURL_CONFIG="${curl_path}/${CURL_CONFIG}"
|
||||
fi
|
||||
AC_MSG_RESULT([${CURL_CONFIG}])
|
||||
CURL_VERSION=`${CURL_CONFIG} --version | sed 's/^[[^0-9]][[^[:space:]]][[^[:space:]]]*[[[:space:]]]*//'`
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl VERSION: $CURL_VERSION); fi
|
||||
CURL_CFLAGS="`${CURL_CONFIG} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl CFLAGS: $CURL_CFLAGS); fi
|
||||
CURL_LDADD="`${CURL_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl LDADD: $CURL_LIBS); fi
|
||||
|
||||
dnl # Check version is ok
|
||||
AC_MSG_CHECKING([if libcurl is at least v${CURL_MIN_VERSION}])
|
||||
curl_min_ver=`echo ${CURL_MIN_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
|
||||
curl_ver=`echo ${CURL_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
|
||||
if test "$curl_min_ver" -le "$curl_ver"; then
|
||||
AC_MSG_RESULT([yes, $CURL_VERSION])
|
||||
curl_tlsv2_ver=`echo 7.34.0 | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
|
||||
if test "$curl_tlsv2_ver" -le "$curl_ver"; then
|
||||
CURL_CFLAGS="${CURL_CFLAGS} -DWITH_CURL_SSLVERSION_TLSv1_2"
|
||||
fi
|
||||
CURL_CFLAGS="${CURL_CFLAGS} -DWITH_CURL"
|
||||
else
|
||||
AC_MSG_RESULT([no, $CURL_VERSION])
|
||||
AC_MSG_NOTICE([NOTE: curl library may be too old])
|
||||
fi
|
||||
|
||||
dnl # Check/warn if GnuTLS is used
|
||||
AC_MSG_CHECKING([if libcurl is linked with gnutls])
|
||||
curl_uses_gnutls=`echo ${CURL_LIBS} | grep gnutls | wc -l`
|
||||
if test "$curl_uses_gnutls" -ne 0; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_NOTICE([NOTE: curl linked with gnutls may be buggy, openssl recommended])
|
||||
CURL_USES_GNUTLS=yes
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
CURL_USES_GNUTLS=no
|
||||
fi
|
||||
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(CURL_CONFIG)
|
||||
AC_SUBST(CURL_VERSION)
|
||||
AC_SUBST(CURL_CPPFLAGS)
|
||||
AC_SUBST(CURL_CFLAGS)
|
||||
AC_SUBST(CURL_LDFLAGS)
|
||||
AC_SUBST(CURL_LDADD)
|
||||
AC_SUBST(CURL_USES_GNUTLS)
|
||||
|
||||
if test -z "${CURL_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** curl library not found.])
|
||||
ifelse([$2], , AC_MSG_NOTICE([NOTE: curl library is only required for building mlogc]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using curl v${CURL_VERSION}])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
@@ -1,195 +0,0 @@
|
||||
dnl Check for LUA Libraries
|
||||
dnl CHECK_LUA(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl LUA_CFLAGS
|
||||
dnl LUA_LIBS
|
||||
|
||||
AC_DEFUN([CHECK_LUA],
|
||||
[dnl
|
||||
|
||||
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
|
||||
LUA_CONFIG=""
|
||||
LUA_VERSION=""
|
||||
LUA_CFLAGS=""
|
||||
LUA_CPPFLAGS=""
|
||||
LUA_LDADD=""
|
||||
LUA_LDFLAGS=""
|
||||
LUA_CONFIG=${PKG_CONFIG}
|
||||
LUA_PKGNAMES="lua5.1 lua-5.1 lua_5.1 lua-51 lua_51 lua51 lua5 lua"
|
||||
LUA_SONAMES="so la sl dll dylib a"
|
||||
|
||||
AC_ARG_WITH(
|
||||
lua,
|
||||
[AC_HELP_STRING([--with-lua=PATH],[Path to lua prefix or config script])]
|
||||
,, with_lua=yes)
|
||||
|
||||
AS_CASE(["${with_lua}"],
|
||||
[no], [test_paths=],
|
||||
[yes], [test_paths="/usr/local/liblua /usr/local/lua /usr/local /opt/liblua /opt/lua /opt /usr"],
|
||||
[test_paths="${with_lua}"])
|
||||
|
||||
AS_IF([test "x${test_paths}" != "x"], [
|
||||
AC_MSG_CHECKING([for liblua config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
LUA_CONFIG=$x
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for y in $LUA_CONFIG; do
|
||||
if test -e "${x}/bin/${y}"; then
|
||||
LUA_CONFIG="${x}/bin/${y}"
|
||||
lua_config="${LUA_CONFIG}"
|
||||
break
|
||||
elif test -e "${x}/${y}"; then
|
||||
LUA_CONFIG="${x}/${y}"
|
||||
lua_config="${LUA_CONFIG}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${lua_config}"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
dnl # Try known package names
|
||||
if test -n "${LUA_CONFIG}"; then
|
||||
LUA_PKGNAME=""
|
||||
for x in ${LUA_PKGNAMES}; do
|
||||
if ${LUA_CONFIG} --exists ${x}; then
|
||||
LUA_PKGNAME="$x"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "${LUA_PKGNAME}"; then
|
||||
AC_MSG_RESULT([${LUA_CONFIG}])
|
||||
LUA_VERSION="`${LUA_CONFIG} ${LUA_PKGNAME} --modversion`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(lua VERSION: $LUA_VERSION); fi
|
||||
LUA_CFLAGS="`${LUA_CONFIG} ${LUA_PKGNAME} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(lua CFLAGS: $LUA_CFLAGS); fi
|
||||
LUA_LDADD="`${LUA_CONFIG} ${LUA_PKGNAME} --libs-only-l`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(lua LDADD: $LUA_LDADD); fi
|
||||
LUA_LDFLAGS="`${LUA_CONFIG} ${LUA_PKGNAME} --libs-only-L --libs-only-other`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(lua LDFLAGS: $LUA_LDFLAGS); fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
dnl Hack to just try to find the lib and include
|
||||
AC_MSG_CHECKING([for lua install])
|
||||
for x in ${test_paths}; do
|
||||
for y in ${LUA_SONAMES}; do
|
||||
if test -e "${x}/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}/lib"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}/lib64"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}/lib32"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/liblua51.${y}"; then
|
||||
lua_lib_path="${x}"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua51.${y}"; then
|
||||
lua_lib_path="${x}/lib"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua51.${y}"; then
|
||||
lua_lib_path="${x}/lib64"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua51.${y}"; then
|
||||
lua_lib_path="${x}/lib32"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/liblua.${y}"; then
|
||||
lua_lib_path="${x}"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua.${y}"; then
|
||||
lua_lib_path="${x}/lib"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua.${y}"; then
|
||||
lua_lib_path="${x}/lib64"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua.${y}"; then
|
||||
lua_lib_path="${x}/lib32"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
else
|
||||
lua_lib_path=""
|
||||
lua_lib_name=""
|
||||
fi
|
||||
done
|
||||
if test -n "$lua_lib_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/include/lua.h"; then
|
||||
lua_inc_path="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/lua.h"; then
|
||||
lua_inc_path="${x}"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Check some sub-paths as well
|
||||
for lua_pkg_name in ${lua_lib_name} ${LUA_PKGNAMES}; do
|
||||
if test -e "${x}/include/${lua_pkg_name}/lua.h"; then
|
||||
lua_inc_path="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/${lua_pkg_name}/lua.h"; then
|
||||
lua_inc_path="${x}"
|
||||
break
|
||||
else
|
||||
lua_inc_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$lua_inc_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${lua_lib_path}" -a -n "${lua_inc_path}"; then
|
||||
LUA_CONFIG=""
|
||||
AC_MSG_RESULT([${lua_lib_path} ${lua_inc_path}])
|
||||
LUA_VERSION="5.1"
|
||||
LUA_CFLAGS="-I${lua_inc_path}"
|
||||
LUA_LDADD="-l${lua_lib_name}"
|
||||
LUA_LDFLAGS="-L${lua_lib_path}"
|
||||
else
|
||||
LUA_VERSION=""
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
AC_SUBST(LUA_CFLAGS)
|
||||
AC_SUBST(LUA_LDADD)
|
||||
AC_SUBST(LUA_LDFLAGS)
|
||||
|
||||
if test -z "${LUA_VERSION}"; then
|
||||
ifelse([$2], , AC_MSG_NOTICE([optional lua library not found]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using lua v${LUA_VERSION}])
|
||||
LUA_CFLAGS="-DWITH_LUA ${LUA_CFLAGS}"
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
@@ -1,90 +0,0 @@
|
||||
dnl Check for PCRE Libraries
|
||||
dnl CHECK_PCRE(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl PCRE_CFLAGS
|
||||
dnl PCRE_LIBS
|
||||
|
||||
PCRE_CONFIG=""
|
||||
PCRE_VERSION=""
|
||||
PCRE_CPPFLAGS=""
|
||||
PCRE_CFLAGS=""
|
||||
PCRE_LDFLAGS=""
|
||||
PCRE_LDADD=""
|
||||
PCRE_LD_PATH=""
|
||||
|
||||
AC_DEFUN([CHECK_PCRE],
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(
|
||||
pcre,
|
||||
[AC_HELP_STRING([--with-pcre=PATH],[Path to pcre prefix or config script])],
|
||||
[test_paths="${with_pcre}"],
|
||||
[test_paths="/usr/local/libpcre /usr/local/pcre /usr/local /opt/libpcre /opt/pcre /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libpcre config script])
|
||||
|
||||
dnl # Determine pcre lib directory
|
||||
if test -z "${with_pcre}"; then
|
||||
test_paths="/usr/local/pcre /usr/local /usr"
|
||||
else
|
||||
test_paths="${with_pcre}"
|
||||
fi
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
PCRE_CONFIG=$x
|
||||
pcre_path="no"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for PCRE_CONFIG in pcre-config; do
|
||||
if test -e "${x}/bin/${PCRE_CONFIG}"; then
|
||||
pcre_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${PCRE_CONFIG}"; then
|
||||
pcre_path="${x}"
|
||||
break
|
||||
else
|
||||
pcre_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$pcre_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${pcre_path}"; then
|
||||
if test "${pcre_path}" != "no"; then
|
||||
PCRE_CONFIG="${pcre_path}/${PCRE_CONFIG}"
|
||||
fi
|
||||
AC_MSG_RESULT([${PCRE_CONFIG}])
|
||||
PCRE_VERSION="`${PCRE_CONFIG} --version`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre VERSION: $PCRE_VERSION); fi
|
||||
PCRE_CFLAGS="`${PCRE_CONFIG} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre CFLAGS: $PCRE_CFLAGS); fi
|
||||
PCRE_LDADD="`${PCRE_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre LDADD: $PCRE_LDADD); fi
|
||||
PCRE_LD_PATH="/`${PCRE_CONFIG} --libs | cut -d'/' -f2,3,4,5,6 | cut -d ' ' -f1`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre PCRE_LD_PATH: $PCRE_LD_PATH); fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(PCRE_CONFIG)
|
||||
AC_SUBST(PCRE_VERSION)
|
||||
AC_SUBST(PCRE_CPPFLAGS)
|
||||
AC_SUBST(PCRE_CFLAGS)
|
||||
AC_SUBST(PCRE_LDFLAGS)
|
||||
AC_SUBST(PCRE_LDADD)
|
||||
AC_SUBST(PCRE_LD_PATH)
|
||||
|
||||
if test -z "${PCRE_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** pcre library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([pcre library is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using pcre v${PCRE_VERSION}])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
@@ -1,64 +0,0 @@
|
||||
dnl Check for SSDEEP Libraries
|
||||
dnl CHECK_SSDEEP(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl SSDEEP_CFLAGS
|
||||
dnl SSDEEP_LDFLAGS
|
||||
|
||||
AC_DEFUN([CHECK_SSDEEP],
|
||||
[dnl
|
||||
|
||||
SSDEEP_CFLAGS=""
|
||||
SSDEEP_LDFLAGS=""
|
||||
SSDEEP_LDADD=""
|
||||
|
||||
AC_ARG_WITH(
|
||||
ssdeep,
|
||||
[AC_HELP_STRING([--with-ssdeep=PATH],[Path to ssdeep prefix])]
|
||||
,, with_ssdeep=yes)
|
||||
|
||||
AS_CASE(["${with_ssdeep}"],
|
||||
[no], [test_paths=],
|
||||
[yes], [test_paths="/usr/ /usr/local/ /usr/local/libfuzzy /usr/local/fuzzy /opt/libfuzzy /opt/fuzzy /opt /opt/local"],
|
||||
[test_paths="${with_ssdeep}"])
|
||||
|
||||
AS_IF([test "x${test_paths}" != "x"], [
|
||||
AC_MSG_CHECKING([for ssdeep path])
|
||||
|
||||
SSDEEP_LIB_NAME="fuzzy"
|
||||
ssdeep_dir=
|
||||
|
||||
if test -z "$withssdeep" -o "$withssdeep" = "yes"; then
|
||||
for i in ${test_paths}; do
|
||||
if test -f "$i/include/fuzzy.h"; then
|
||||
SSDEEP_CFLAGS="-I$i/include"
|
||||
ssdeep_dir=$i
|
||||
fi
|
||||
done
|
||||
else
|
||||
if test -f "$withssdeep/include/fuzzy.h"; then
|
||||
SSDEEP_CFLAGS="-I$withssdeep/include"
|
||||
ssdeep_dir=$withssdeep
|
||||
fi
|
||||
fi
|
||||
|
||||
SSDEEP_LDFLAGS="-L$ssdeep_dir/lib -lfuzzy"
|
||||
SSDEEP_LDADD="-lfuzzy"
|
||||
|
||||
])
|
||||
|
||||
if test -z "${SSDEEP_CFLAGS}"; then
|
||||
AC_MSG_RESULT([no])
|
||||
SSDEEP_LDFLAGS=""
|
||||
SSDEEP_LDADD=""
|
||||
AC_MSG_NOTICE([optional ssdeep library not found])
|
||||
else
|
||||
SSDEEP_CFLAGS="-DWITH_SSDEEP ${SSDEEP_CFLAGS}"
|
||||
AC_MSG_RESULT([${SSDEEP_LDFLAGS} ${SSDEEP_CFLAGS}])
|
||||
fi
|
||||
|
||||
AC_SUBST(SSDEEP_LDFLAGS)
|
||||
AC_SUBST(SSDEEP_LDADD)
|
||||
AC_SUBST(SSDEEP_CFLAGS)
|
||||
|
||||
|
||||
])
|
@@ -1,90 +0,0 @@
|
||||
dnl Check for LIBXML2 Libraries
|
||||
dnl CHECK_LIBXML2(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl LIBXML2_CFLAGS
|
||||
dnl LIBXML2_LIBS
|
||||
|
||||
LIBXML2_CONFIG=""
|
||||
LIBXML2_VERSION=""
|
||||
LIBXML2_CFLAGS=""
|
||||
LIBXML2_CPPFLAGS=""
|
||||
LIBXML2_LDADD=""
|
||||
LIBXML2_LDFLAGS=""
|
||||
|
||||
AC_DEFUN([CHECK_LIBXML2],
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(
|
||||
libxml,
|
||||
[AC_HELP_STRING([--with-libxml=PATH],[Path to libxml2 prefix or config script])],
|
||||
[test_paths="${with_libxml}"],
|
||||
[test_paths="/usr/local/libxml2 /usr/local/xml2 /usr/local/xml /usr/local /opt/libxml2 /opt/libxml /opt/xml2 /opt/xml /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libxml2 config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
LIBXML2_CONFIG=$x
|
||||
libxml2_path="no"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for LIBXML2_CONFIG in xml2-config xml-2-config xml-config; do
|
||||
if test -e "${x}/bin/${LIBXML2_CONFIG}"; then
|
||||
libxml2_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${LIBXML2_CONFIG}"; then
|
||||
libxml2_path="${x}"
|
||||
break
|
||||
else
|
||||
libxml2_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$libxml2_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${libxml2_path}"; then
|
||||
if test "${libxml2_path}" != "no"; then
|
||||
LIBXML2_CONFIG="${libxml2_path}/${LIBXML2_CONFIG}"
|
||||
fi
|
||||
AC_MSG_RESULT([${LIBXML2_CONFIG}])
|
||||
LIBXML2_VERSION=`${LIBXML2_CONFIG} --version | sed 's/^[[^0-9]][[^[:space:]]][[^[:space:]]]*[[[:space:]]]*//'`
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml VERSION: $LIBXML2_VERSION); fi
|
||||
LIBXML2_CFLAGS="`${LIBXML2_CONFIG} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml CFLAGS: $LIBXML2_CFLAGS); fi
|
||||
LIBXML2_LDADD="`${LIBXML2_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml LDADD: $LIBXML2_LDADD); fi
|
||||
|
||||
AC_MSG_CHECKING([if libxml2 is at least v2.6.29])
|
||||
libxml2_min_ver=`echo 2.6.29 | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
|
||||
libxml2_ver=`echo ${LIBXML2_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
|
||||
if test "$libxml2_ver" -ge "$libxml2_min_ver"; then
|
||||
AC_MSG_RESULT([yes, $LIBXML2_VERSION])
|
||||
else
|
||||
AC_MSG_RESULT([no, $LIBXML2_VERSION])
|
||||
AC_MSG_ERROR([NOTE: libxml2 library must be at least 2.6.29])
|
||||
fi
|
||||
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBXML2_CONFIG)
|
||||
AC_SUBST(LIBXML2_VERSION)
|
||||
AC_SUBST(LIBXML2_CFLAGS)
|
||||
AC_SUBST(LIBXML2_CPPFLAGS)
|
||||
AC_SUBST(LIBXML2_LDADD)
|
||||
AC_SUBST(LIBXML2_LDFLAGS)
|
||||
|
||||
if test -z "${LIBXML2_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** xml library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([libxml2 is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using libxml2 v${LIBXML2_VERSION}])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
@@ -1,153 +0,0 @@
|
||||
dnl Check for YAJL Libraries
|
||||
dnl CHECK_YAJL(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl YAJL_CFLAGS
|
||||
dnl YAJL_LDADD
|
||||
dnl YAJL_LDFLAGS
|
||||
dnl YAJL_LIBS
|
||||
|
||||
AC_DEFUN([CHECK_YAJL],
|
||||
[dnl
|
||||
|
||||
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||
|
||||
YAJL_CONFIG=""
|
||||
YAJL_VERSION=""
|
||||
YAJL_CFLAGS=""
|
||||
YAJL_CPPFLAGS=""
|
||||
YAJL_LDADD=""
|
||||
YAJL_LDFLAGS=""
|
||||
YAJL_CONFIG=${PKG_CONFIG}
|
||||
YAJL_PKGNAMES="yajl2 yajl"
|
||||
YAJL_SONAMES="so la sl dll dylib"
|
||||
|
||||
AC_ARG_WITH(
|
||||
yajl,
|
||||
[AC_HELP_STRING([--with-yajl=PATH],[Path to yajl prefix or config script])]
|
||||
,, with_yajl=yes)
|
||||
|
||||
AS_CASE(["${with_yajl}"],
|
||||
[no], [test_paths=],
|
||||
[yes], [test_paths="/usr/local/libyajl /usr/local/yajl /usr/local /opt/libyajl /opt/yajl /opt /usr"],
|
||||
[test_paths="${with_yajl}"])
|
||||
|
||||
AS_IF([test "x${test_paths}" != "x"], [
|
||||
AC_MSG_CHECKING([for libyajl config script])
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
YAJL_CONFIG=$x
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for y in $YAJL_CONFIG; do
|
||||
if test -e "${x}/bin/${y}"; then
|
||||
YAJL_CONFIG="${x}/bin/${y}"
|
||||
yajl_config="${YAJL_CONFIG}"
|
||||
break
|
||||
elif test -e "${x}/${y}"; then
|
||||
YAJL_CONFIG="${x}/${y}"
|
||||
yajl_config="${YAJL_CONFIG}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${yajl_config}"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
dnl # Try known package names
|
||||
if test -n "${YAJL_CONFIG}"; then
|
||||
YAJL_PKGNAME=""
|
||||
for x in ${YAJL_PKGNAMES}; do
|
||||
if ${YAJL_CONFIG} --exists ${x}; then
|
||||
YAJL_PKGNAME="$x"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "${YAJL_PKGNAME}"; then
|
||||
AC_MSG_RESULT([${YAJL_CONFIG}])
|
||||
YAJL_VERSION="`${YAJL_CONFIG} ${YAJL_PKGNAME} --modversion`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(yajl VERSION: $YAJL_VERSION); fi
|
||||
YAJL_CFLAGS="`${YAJL_CONFIG} ${YAJL_PKGNAME} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(yajl CFLAGS: $YAJL_CFLAGS); fi
|
||||
YAJL_LDADD="`${YAJL_CONFIG} ${YAJL_PKGNAME} --libs-only-l`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(yajl LDADD: $YAJL_LDADD); fi
|
||||
YAJL_LDFLAGS="`${YAJL_CONFIG} ${YAJL_PKGNAME} --libs-only-L --libs-only-other`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(yajl LDFLAGS: $YAJL_LDFLAGS); fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
dnl Hack to just try to find the lib and include
|
||||
AC_MSG_CHECKING([for yajl install])
|
||||
for x in ${test_paths}; do
|
||||
for y in ${YAJL_SONAMES}; do
|
||||
if test -e "${x}/libyajl.${y}"; then
|
||||
yajl_lib_path="${x}/"
|
||||
yajl_lib_name="yajl"
|
||||
break
|
||||
else
|
||||
yajl_lib_path=""
|
||||
yajl_lib_name=""
|
||||
fi
|
||||
done
|
||||
if test -n "$yajl_lib_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/include/yajl_parse.h"; then
|
||||
yajl_inc_path="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/yajl_parse.h"; then
|
||||
yajl_inc_path="${x}"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Check some sub-paths as well
|
||||
for yajl_pkg_name in ${yajl_lib_name} ${YAJL_PKGNAMES}; do
|
||||
if test -e "${x}/include/${yajl_pkg_name}/yajl_parse.h"; then
|
||||
yajl_inc_path="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/${yajl_pkg_name}/yajl_parse.h"; then
|
||||
yajl_inc_path="${x}"
|
||||
break
|
||||
else
|
||||
yajl_inc_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$yajl_inc_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${yajl_lib_path}" -a -n "${yajl_inc_path}"; then
|
||||
YAJL_CONFIG=""
|
||||
AC_MSG_RESULT([${yajl_lib_path} ${yajl_inc_path}])
|
||||
YAJL_VERSION="2"
|
||||
YAJL_CFLAGS="-I${yajl_inc_path}"
|
||||
YAJL_LDADD="-l${yajl_lib_name}"
|
||||
YAJL_LDFLAGS="-L${yajl_lib_path}"
|
||||
else
|
||||
YAJL_VERSION=""
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
YAJL_LIBS=${YAJL_LDADD}
|
||||
AC_SUBST(YAJL_CFLAGS)
|
||||
AC_SUBST(YAJL_LDADD)
|
||||
AC_SUBST(YAJL_LIBS)
|
||||
AC_SUBST(YAJL_LDFLAGS)
|
||||
if test -z "${YAJL_VERSION}"; then
|
||||
ifelse([$2], , AC_MSG_NOTICE([optional yajl library not found]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using yajl v${YAJL_VERSION}])
|
||||
YAJL_CFLAGS="-DWITH_YAJL ${YAJL_CFLAGS}"
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
Reference in New Issue
Block a user