You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/17 06:52:43 UTC
svn commit: r944969 [1/3] - in /trafficserver/traffic/trunk: Makefile.am
build/ build/common.m4 build/crypto.m4 build/dbd.m4 build/lzma.m4
build/network.m4 build/pcre.m4 build/tcl.m4 build/xml.m4 build/zlib.m4
configure.ac m4/
Author: mturk
Date: Mon May 17 04:52:42 2010
New Revision: 944969
URL: http://svn.apache.org/viewvc?rev=944969&view=rev
Log:
Use new set of autoconf macros from TS-345. They allow generic look and feel for all directives
Added:
trafficserver/traffic/trunk/build/
trafficserver/traffic/trunk/build/common.m4 (with props)
trafficserver/traffic/trunk/build/crypto.m4 (with props)
trafficserver/traffic/trunk/build/dbd.m4 (with props)
trafficserver/traffic/trunk/build/lzma.m4 (with props)
trafficserver/traffic/trunk/build/network.m4 (with props)
trafficserver/traffic/trunk/build/pcre.m4 (with props)
trafficserver/traffic/trunk/build/tcl.m4 (with props)
trafficserver/traffic/trunk/build/xml.m4 (with props)
trafficserver/traffic/trunk/build/zlib.m4 (with props)
Removed:
trafficserver/traffic/trunk/m4/
Modified:
trafficserver/traffic/trunk/Makefile.am
trafficserver/traffic/trunk/configure.ac
Modified: trafficserver/traffic/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/Makefile.am?rev=944969&r1=944968&r2=944969&view=diff
==============================================================================
--- trafficserver/traffic/trunk/Makefile.am (original)
+++ trafficserver/traffic/trunk/Makefile.am Mon May 17 04:52:42 2010
@@ -19,7 +19,7 @@
# Local Macros
# http://www.gnu.org/software/automake/manual/automake.html#Local-Macros
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I build
if STANDALONE_IOCORE
SUBDIRS = libinktomi++ librecords iocore @hdr_dirs@ proxy example
Added: trafficserver/traffic/trunk/build/common.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/common.m4?rev=944969&view=auto
==============================================================================
--- trafficserver/traffic/trunk/build/common.m4 (added)
+++ trafficserver/traffic/trunk/build/common.m4 Mon May 17 04:52:42 2010
@@ -0,0 +1,502 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl common.m4: Trafficserver's general-purpose autoconf macros
+dnl
+
+dnl
+dnl ATS_CONFIG_NICE(filename)
+dnl
+dnl Saves a snapshot of the configure command-line for later reuse
+dnl
+AC_DEFUN([ATS_CONFIG_NICE], [
+ rm -f $1
+ cat >$1<<EOF
+#! /bin/sh
+#
+# Created by configure
+
+EOF
+ if test -n "$CC"; then
+ echo "CC=\"$CC\"; export CC" >> $1
+ fi
+ if test -n "$CXX"; then
+ echo "CXX=\"$CXX\"; export CXX" >> $1
+ fi
+ if test -n "$CFLAGS"; then
+ echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> $1
+ fi
+ if test -n "$CXXFLAGS"; then
+ echo "CXXFLAGS=\"$CXXFLAGS\"; export CXXFLAGS" >> $1
+ fi
+ if test -n "$CPPFLAGS"; then
+ echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> $1
+ fi
+ if test -n "$LDFLAGS"; then
+ echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> $1
+ fi
+ if test -n "$LTFLAGS"; then
+ echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> $1
+ fi
+ if test -n "$LIBS"; then
+ echo "LIBS=\"$LIBS\"; export LIBS" >> $1
+ fi
+ if test -n "$INCLUDES"; then
+ echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> $1
+ fi
+ if test -n "$NOTEST_CFLAGS"; then
+ echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_CXXFLAGS"; then
+ echo "NOTEST_CXXFLAGS=\"$NOTEST_CXXFLAGS\"; export NOTEST_CXXFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_CPPFLAGS"; then
+ echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_LDFLAGS"; then
+ echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_LIBS"; then
+ echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> $1
+ fi
+
+ # Retrieve command-line arguments.
+ eval "set x $[0] $ac_configure_args"
+ shift
+
+ for arg
+ do
+ ATS_EXPAND_VAR(arg, $arg)
+ echo "\"[$]arg\" \\" >> $1
+ done
+ echo '"[$]@"' >> $1
+ chmod +x $1
+])dnl
+
+dnl
+dnl ATS_SETIFNULL(variable, value)
+dnl
+dnl Set variable iff it's currently null
+dnl
+AC_DEFUN([ATS_SETIFNULL], [
+ if test -z "$$1"; then
+ test "x$verbose" = "xyes" && echo " setting $1 to \"$2\""
+ $1="$2"
+ fi
+])dnl
+
+dnl
+dnl ATS_SETVAR(variable, value)
+dnl
+dnl Set variable no matter what
+dnl
+AC_DEFUN([ATS_SETVAR], [
+ test "x$verbose" = "xyes" && echo " forcing $1 to \"$2\""
+ $1="$2"
+])dnl
+
+dnl
+dnl ATS_ADDTO(variable, value)
+dnl
+dnl Add value to variable
+dnl
+AC_DEFUN([ATS_ADDTO], [
+ if test "x$$1" = "x"; then
+ test "x$verbose" = "xyes" && echo " setting $1 to \"$2\""
+ $1="$2"
+ else
+ ats_addto_bugger="$2"
+ for i in $ats_addto_bugger; do
+ ats_addto_duplicate="0"
+ for j in $$1; do
+ if test "x$i" = "x$j"; then
+ ats_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $ats_addto_duplicate = "0"; then
+ test "x$verbose" = "xyes" && echo " adding \"$i\" to $1"
+ $1="$$1 $i"
+ fi
+ done
+ fi
+])dnl
+
+dnl
+dnl ATS_REMOVEFROM(variable, value)
+dnl
+dnl Remove a value from a variable
+dnl
+AC_DEFUN([ATS_REMOVEFROM], [
+ if test "x$$1" = "x$2"; then
+ test "x$verbose" = "xyes" && echo " nulling $1"
+ $1=""
+ else
+ ats_new_bugger=""
+ ats_removed=0
+ for i in $$1; do
+ if test "x$i" != "x$2"; then
+ ats_new_bugger="$ats_new_bugger $i"
+ else
+ ats_removed=1
+ fi
+ done
+ if test $ats_removed = "1"; then
+ test "x$verbose" = "xyes" && echo " removed \"$2\" from $1"
+ $1=$ats_new_bugger
+ fi
+ fi
+]) dnl
+
+dnl
+dnl ATS_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
+dnl [ACTIONS-IF-NO-WARNINGS], [ACTIONS-IF-WARNINGS])
+dnl
+dnl Tries a compile test with warnings activated so that the result
+dnl is false if the code doesn't compile cleanly. For compilers
+dnl where it is not known how to activate a "fail-on-error" mode,
+dnl it is undefined which of the sets of actions will be run.
+dnl
+AC_DEFUN([ATS_TRY_COMPILE_NO_WARNING],
+[ats_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $CFLAGS_WARN"
+ if test "$ac_cv_prog_gcc" = "yes"; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+ [#include "confdefs.h"
+ ]
+ [[$1]]
+ [int main(int argc, const char *const *argv) {]
+ [[$2]]
+ [ return 0; }],
+ [$3], [$4])
+ CFLAGS=$ats_save_CFLAGS
+])
+
+
+dnl Iteratively interpolate the contents of the second argument
+dnl until interpolation offers no new result. Then assign the
+dnl final result to $1.
+dnl
+dnl Example:
+dnl
+dnl foo=1
+dnl bar='${foo}/2'
+dnl baz='${bar}/3'
+dnl ATS_EXPAND_VAR(fraz, $baz)
+dnl $fraz is now "1/2/3"
+dnl
+AC_DEFUN([ATS_EXPAND_VAR], [
+ats_last=
+ats_cur="$2"
+while test "x${ats_cur}" != "x${ats_last}";
+do
+ ats_last="${ats_cur}"
+ ats_cur=`eval "echo ${ats_cur}"`
+done
+$1="${ats_cur}"
+])
+
+
+dnl
+dnl Removes the value of $3 from the string in $2, strips of any leading
+dnl slashes, and returns the value in $1.
+dnl
+dnl Example:
+dnl orig_path="${prefix}/bar"
+dnl ATS_PATH_RELATIVE(final_path, $orig_path, $prefix)
+dnl $final_path now contains "bar"
+AC_DEFUN([ATS_PATH_RELATIVE], [
+ats_stripped=`echo $2 | sed -e "s#^$3##"`
+# check if the stripping was successful
+if test "x$2" != "x${ats_stripped}"; then
+# it was, so strip of any leading slashes
+ $1="`echo ${ats_stripped} | sed -e 's#^/*##'`"
+else
+# it wasn't so return the original
+ $1="$2"
+fi
+])
+
+
+dnl ATS_SUBST(VARIABLE)
+dnl Makes VARIABLE available in generated files
+dnl (do not use @variable@ in Makefiles, but $(variable))
+AC_DEFUN([ATS_SUBST], [
+ ATS_VAR_SUBST="$ATS_VAR_SUBST $1"
+ AC_SUBST($1)
+])
+
+
+dnl
+dnl ATS_SUBST_EXPANDED_ARG
+dnl Export (via ATS_SUBST) the various path-related variables that
+dnl trafficserver will use while generating scripts and
+dnl the default config file.
+AC_DEFUN([ATS_SUBST_EXPANDED_ARG], [
+ ATS_EXPAND_VAR(exp_$1, [$]$1)
+ ATS_PATH_RELATIVE(rel_$1, [$]exp_$1, ${prefix})
+ ATS_SUBST(exp_$1)
+ ATS_SUBST(rel_$1)
+ ATS_SUBST($1)
+])
+
+dnl ATS_HELP_STRING(LHS, RHS)
+dnl Autoconf 2.50 can not handle substr correctly. It does have
+dnl AC_HELP_STRING, so let's try to call it if we can.
+dnl Note: this define must be on one line so that it can be properly returned
+dnl as the help string. When using this macro with a multi-line RHS, ensure
+dnl that you surround the macro invocation with []s
+AC_DEFUN([ATS_HELP_STRING], [ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
+
+dnl
+dnl ATS_LAYOUT(configlayout, layoutname [, extravars])
+dnl
+AC_DEFUN([ATS_LAYOUT], [
+ if test ! -f $srcdir/config.layout; then
+ echo "** Error: Layout file $srcdir/config.layout not found"
+ echo "** Error: Cannot use undefined layout '$LAYOUT'"
+ exit 1
+ fi
+ # Catch layout names including a slash which will otherwise
+ # confuse the heck out of the sed script.
+ case $2 in
+ */*)
+ echo "** Error: $2 is not a valid layout name"
+ exit 1 ;;
+ esac
+ pldconf=./config.pld
+ changequote({,})
+ sed -e "1s/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*//;1t" \
+ -e "1,/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*/d" \
+ -e '/[ ]*<\/Layout>[ ]*/,$d' \
+ -e "s/^[ ]*//g" \
+ -e "s/:[ ]*/=\'/g" \
+ -e "s/[ ]*$/'/g" \
+ $1 > $pldconf
+ layout_name=$2
+ if test ! -s $pldconf; then
+ echo "** Error: unable to find layout $layout_name"
+ exit 1
+ fi
+ . $pldconf
+ rm $pldconf
+ for var in prefix exec_prefix bindir sbindir libexecdir mandir infodir \
+ sysconfdir datadir includedir localstatedir runtimedir \
+ logdir libdir installbuilddir libsuffix $3; do
+ eval "val=\"\$$var\""
+ case $val in
+ *+)
+ val=`echo $val | sed -e 's;\+$;;'`
+ eval "$var=\"\$val\""
+ autosuffix=yes
+ ;;
+ *)
+ autosuffix=no
+ ;;
+ esac
+ val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
+ val=`echo $val | sed -e 's:[\$]\([a-z_]*\):${\1}:g'`
+ if test "$autosuffix" = "yes"; then
+ if echo $val | grep -i trafficserver >/dev/null; then
+ addtarget=no
+ else
+ addtarget=yes
+ fi
+ if test "$addtarget" = "yes"; then
+ val="$val/trafficserver"
+ fi
+ fi
+ eval "$var='$val'"
+ done
+ for var in bindir sbindir libexecdir sysconfdir datadir \
+ localstatedir logdir libdir runtimedir $3; do
+ eval "val=\"\$$var\""
+ org_val=
+ exp_val="$val"
+ while test "x${exp_val}" != "x${org_val}";
+ do
+ org_val="${exp_val}"
+ exp_val="`eval \"echo ${exp_val}\"`"
+ done
+ if echo $exp_val | grep -i trafficserver >/dev/null; then
+ addtarget=no
+ else
+ addtarget=yes
+ fi
+ if test "$addtarget" = "yes"; then
+ val="$val/trafficserver"
+ fi
+ var="pkg${var}"
+ eval "$var='$val'"
+ done
+ changequote([,])
+])dnl
+
+dnl
+dnl ATS_ENABLE_LAYOUT(default layout name [, extra vars])
+dnl
+AC_DEFUN([ATS_ENABLE_LAYOUT], [
+AC_ARG_ENABLE(layout,
+ [ATS_HELP_STRING([--enable-layout=LAYOUT],[Enable LAYOUT specified inside config.layout file (defaults to Trafficserver)])],[
+ LAYOUT=$enableval
+])
+
+if test -z "$LAYOUT"; then
+ LAYOUT="$1"
+fi
+ATS_LAYOUT($srcdir/config.layout, $LAYOUT, $2)
+
+AC_MSG_CHECKING(for chosen layout)
+AC_MSG_RESULT($layout_name)
+])
+
+
+dnl
+dnl ATS_PARSE_ARGUMENTS
+dnl a reimplementation of autoconf's argument parser,
+dnl used here to allow us to co-exist layouts and argument based
+dnl set ups.
+AC_DEFUN([ATS_PARSE_ARGUMENTS], [
+ac_prev=
+# Retrieve the command-line arguments. The eval is needed because
+# the arguments are quoted to preserve accuracy.
+eval "set x $ac_configure_args"
+shift
+for ac_option
+do
+# If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -runtimedir | --runtimedir | --runtimedi | --runtimed | --runtime | --runtim \
+ | --runti | --runt | --run | --ru | --r)
+ ac_prev=runtimedir ;;
+ -runtimedir=* | --runtimedir=* | --runtimedi=* | --runtimed=* | --runtime=* \
+ | --runtim=* | --runti=* | --runt=* | --run=* | --ru=* | --r=*)
+ ac_prev=runtimedir ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
+ *) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
+ esac
+done
+
+])dnl
+
Propchange: trafficserver/traffic/trunk/build/common.m4
------------------------------------------------------------------------------
svn:eol-style = native
Added: trafficserver/traffic/trunk/build/crypto.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/crypto.m4?rev=944969&view=auto
==============================================================================
--- trafficserver/traffic/trunk/build/crypto.m4 (added)
+++ trafficserver/traffic/trunk/build/crypto.m4 Mon May 17 04:52:42 2010
@@ -0,0 +1,134 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl crypto.m4 Trafficserver's Crypto autoconf macros
+dnl
+
+dnl
+dnl ATS_CHECK_CRYPTO: look for crypto libraries and headers
+dnl
+AC_DEFUN([ATS_CHECK_CRYPTO], [
+ enable_crypto=no
+ AC_CHECK_LIB([crypt],[crypt],[AC_SUBST([LIBCRYPT],["-lcrypt"])])
+
+ ATS_CHECK_CRYPTO_OPENSSL
+ dnl add checks for other varieties of ssl here
+])
+dnl
+
+AC_DEFUN([ATS_CHECK_CRYPTO_OPENSSL], [
+enable_openssl=no
+AC_ARG_WITH(openssl, [AC_HELP_STRING([--with-openssl=DIR],[use a specific OpenSSL library])],
+[
+ if test "x$withval" != "xyes" && test "x$withval" != "x"; then
+ openssl_base_dir="$withval"
+ if test "$withval" != "no"; then
+ enable_openssl=yes
+ case "$withval" in
+ *":"*)
+ openssl_include="`echo $withval |sed -e 's/:.*$//'`"
+ openssl_ldflags="`echo $withval |sed -e 's/^.*://'`"
+ AC_MSG_CHECKING(checking for OpenSSL includes in $openssl_include libs in $openssl_ldflags )
+ ;;
+ *)
+ openssl_include="$withval/include"
+ openssl_ldflags="$withval/lib"
+ AC_MSG_CHECKING(checking for OpenSSL includes in $withval)
+ ;;
+ esac
+ fi
+ fi
+])
+
+if test "x$openssl_base_dir" = "x"; then
+ AC_MSG_CHECKING([for OpenSSL location])
+ AC_CACHE_VAL(cv_openssl_dir,[
+ for dir in /usr/local/ssl /usr/pkg /usr/sfw /usr/local /usr; do
+ if test -d $dir && test -f $dir/include/openssl/x509.h; then
+ cv_openssl_dir=$dir
+ break
+ fi
+ done
+ ])
+ openssl_base_dir=$cv_openssl_dir
+ if test "x$openssl_base_dir" = "x"; then
+ enable_openssl=no
+ AC_MSG_RESULT([not found])
+ else
+ enable_openssl=yes
+ openssl_include="$openssl_base_dir/include"
+ openssl_ldflags="$openssl_base_dir/lib"
+ AC_MSG_RESULT([${openssl_base_dir}])
+ fi
+else
+ if test -d $openssl_include/openssl && test -d $openssl_ldflags && test -f $openssl_include/openssl/x509.h; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+fi
+
+if test "$enable_openssl" != "no"; then
+ saved_ldflags=$LDFLAGS
+ saved_cppflags=$CPPFLAGS
+ openssl_have_headers=0
+ openssl_have_libs=0
+ if test "$openssl_base_dir" != "/usr"; then
+ ATS_ADDTO(CPPFLAGS, [-I${openssl_include}])
+ ATS_ADDTO(LDFLAGS, [-L${openssl_ldflags}])
+ case $host_os in
+ solaris*)
+ ATS_ADDTO(LDFLAGS, [-R${openssl_ldflags}])
+ ;;
+ esac
+ fi
+ AC_CHECK_LIB(crypto, BN_init, AC_CHECK_LIB(ssl, SSL_accept, [openssl_have_libs=1],,-lcrypto))
+ if test "$openssl_have_libs" != "0"; then
+ AC_CHECK_HEADERS(openssl/x509.h, [openssl_have_headers=1])
+ fi
+ if test "$openssl_have_headers" != "0"; then
+ AC_CHECK_DECLS([EVP_PKEY_CTX_new], [], [],
+ [#include <openssl/evp.h>])
+
+ enable_crypto=yes
+
+ AC_MSG_CHECKING([for const input buffers in OpenSSL])
+ AC_TRY_COMPILE([#include <openssl/rsa.h>],
+ [ const unsigned char * buf;
+ unsigned char * outbuf;
+ RSA rsa;
+ RSA_private_decrypt(1,
+ buf,
+ outbuf,
+ &rsa,
+ RSA_PKCS1_PADDING);
+
+ ],
+ [AC_MSG_RESULT([yes])]
+ [AC_DEFINE([CRYPTO_OPENSSL_CONST_BUFFERS], 1, [Define that OpenSSL uses const buffers])],
+ [AC_MSG_RESULT([no])])
+
+ AC_SUBST([LIBSSL],["-lssl -lcrypto"])
+ AC_DEFINE([HAVE_LIBSSL],[1],[Define to 1 if you have OpenSSL library])
+ else
+ enable_openssl=no
+ CPPFLAGS=$saved_cppflags
+ LDFLAGS=$saved_ldflags
+ fi
+fi
+
+])
Propchange: trafficserver/traffic/trunk/build/crypto.m4
------------------------------------------------------------------------------
svn:eol-style = native
Added: trafficserver/traffic/trunk/build/dbd.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/dbd.m4?rev=944969&view=auto
==============================================================================
--- trafficserver/traffic/trunk/build/dbd.m4 (added)
+++ trafficserver/traffic/trunk/build/dbd.m4 Mon May 17 04:52:42 2010
@@ -0,0 +1,188 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl dbd.m4: Trafficserver's DBD autoconf macros
+dnl
+
+dnl
+dnl ATS_CHECK_SQLITE3: look for sqlite3 libraries and headers
+dnl
+AC_DEFUN([ATS_CHECK_SQLITE3], [
+enable_sqlite3=no
+AC_ARG_WITH(sqlite3, [AC_HELP_STRING([--with-sqlite3=DIR],[use a specific sqlite3 library])],
+[
+ if test "x$withval" != "xyes" && test "x$withval" != "x"; then
+ sqlite3_base_dir="$withval"
+ if test "$withval" != "no"; then
+ enable_sqlite3=yes
+ case "$withval" in
+ *":"*)
+ sqlite3_include="`echo $withval |sed -e 's/:.*$//'`"
+ sqlite3_ldflags="`echo $withval |sed -e 's/^.*://'`"
+ AC_MSG_CHECKING(checking for sqlite3 includes in $sqlite3_include libs in $sqlite3_ldflags )
+ ;;
+ *)
+ sqlite3_include="$withval/include"
+ sqlite3_ldflags="$withval/lib"
+ AC_MSG_CHECKING(checking for sqlite3 includes in $withval)
+ ;;
+ esac
+ fi
+ fi
+])
+
+if test "x$sqlite3_base_dir" = "x"; then
+ AC_MSG_CHECKING([for sqlite3 location])
+ AC_CACHE_VAL(cv_sqlite3_dir,[
+ for dir in /usr/local /usr ; do
+ if test -d $dir && test -f $dir/include/sqlite3.h; then
+ cv_sqlite3_dir=$dir
+ break
+ fi
+ done
+ ])
+ sqlite3_base_dir=$cv_sqlite3_dir
+ if test "x$sqlite3_base_dir" = "x"; then
+ enable_sqlite3=no
+ AC_MSG_RESULT([not found])
+ else
+ enable_sqlite3=yes
+ sqlite3_include="$sqlite3_base_dir/include"
+ sqlite3_ldflags="$sqlite3_base_dir/lib"
+ AC_MSG_RESULT([$sqlite3_base_dir])
+ fi
+else
+ if test -d $sqlite3_include && test -d $sqlite3_ldflags && test -f $sqlite3_include/sqlite3.h; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+fi
+
+if test "$enable_sqlite3" != "no"; then
+ saved_ldflags=$LDFLAGS
+ saved_cppflags=$CPPFLAGS
+ sqlite3_have_headers=0
+ sqlite3_have_libs=0
+ if test "$sqlite3_base_dir" != "/usr"; then
+ ATS_ADDTO(CPPFLAGS, [-I${sqlite3_include}])
+ ATS_ADDTO(LDFLAGS, [-L${sqlite3_ldflags}])
+ case $host_os in
+ solaris*)
+ ATS_ADDTO(LDFLAGS, [-R${sqlite3_ldflags}])
+ ;;
+ esac
+ fi
+ AC_CHECK_LIB(sqlite3, sqlite3_open_v2, [sqlite3_have_libs=1])
+ if test "$sqlite3_have_libs" != "0"; then
+ AC_CHECK_HEADERS(sqlite3.h, [sqlite3_have_headers=1])
+ fi
+ if test "$sqlite3_have_headers" != "0"; then
+ AC_DEFINE(HAVE_SQLITE3,1,[Compiling with Sqlite3 support])
+ AC_SUBST([LIBSQLITE3], ["-lsqlite3"])
+ else
+ enable_sqlite3=no
+ CPPFLAGS=$saved_cppflags
+ LDFLAGS=$saved_ldflags
+ fi
+fi
+])
+
+dnl
+dnl ATS_CHECK_BDB: look for Berkeley-DB libraries and headers
+dnl
+AC_DEFUN([ATS_CHECK_BDB], [
+enable_libdb=no
+AC_ARG_WITH(bdb, [AC_HELP_STRING([--with-libdb=DIR],[use a specific Berkeley-DB library])],
+[
+ if test "x$withval" != "xyes" && test "x$withval" != "x"; then
+ libdb_base_dir="$withval"
+ if test "$withval" != "no"; then
+ enable_libdb=yes
+ case "$withval" in
+ *":"*)
+ libdb_include="`echo $withval |sed -e 's/:.*$//'`"
+ libdb_ldflags="`echo $withval |sed -e 's/^.*://'`"
+ AC_MSG_CHECKING(checking for libdb includes in $libdb_include libs in $libdb_ldflags )
+ ;;
+ *)
+ libdb_include="$withval/include"
+ libdb_ldflags="$withval/lib"
+ AC_MSG_CHECKING(checking for libdb includes in $withval)
+ ;;
+ esac
+ fi
+ fi
+])
+
+if test "x$libdb_base_dir" = "x"; then
+ AC_MSG_CHECKING([for libdb location])
+ AC_CACHE_VAL(cv_libdb_dir,[
+ for dir in /usr/local /usr ; do
+ if test -d $dir && test -f $dir/include/db.h; then
+ cv_libdb_dir=$dir
+ break
+ fi
+ done
+ ])
+ libdb_base_dir=$cv_libdb_dir
+ if test "x$libdb_base_dir" = "x"; then
+ enable_libdb=no
+ AC_MSG_RESULT([not found])
+ else
+ enable_libdb=yes
+ libdb_include="$libdb_base_dir/include"
+ libdb_ldflags="$libdb_base_dir/lib"
+ AC_MSG_RESULT([$libdb_base_dir])
+ fi
+else
+ if test -d $libdb_include && test -d $libdb_ldflags && test -f $libdb_include/db.h; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+fi
+
+if test "$enable_libdb" != "no"; then
+ saved_ldflags=$LDFLAGS
+ saved_cppflags=$CPPFLAGS
+ libdb_have_headers=0
+ libdb_have_libs=0
+ if test "$libdb_base_dir" != "/usr"; then
+ ATS_ADDTO(CPPFLAGS, [-I${libdb_include}])
+ ATS_ADDTO(LDFLAGS, [-L${libdb_ldflags}])
+ case $host_os in
+ solaris*)
+ ATS_ADDTO(LDFLAGS, [-R${libdb_ldflags}])
+ ;;
+ esac
+ fi
+ AC_CHECK_LIB(db, __db_open, [libdb_have_libs=1])
+ AC_CHECK_LIB(db, __db185_open, [libdb_have_libs=1])
+ if test "$libdb_have_libs" != "0"; then
+ AC_CHECK_HEADERS(db_185.h db.h, [libdb_have_headers=1])
+ fi
+ if test "$libdb_have_headers" != "0"; then
+ AC_DEFINE(HAVE_LIBDB,1,[Compiling with Berkeley-DB support])
+ AC_SUBST([LIBDB], ["-ldb"])
+ else
+ enable_libdb=no
+ CPPFLAGS=$saved_cppflags
+ LDFLAGS=$saved_ldflags
+ fi
+fi
+])
Propchange: trafficserver/traffic/trunk/build/dbd.m4
------------------------------------------------------------------------------
svn:eol-style = native
Added: trafficserver/traffic/trunk/build/lzma.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/lzma.m4?rev=944969&view=auto
==============================================================================
--- trafficserver/traffic/trunk/build/lzma.m4 (added)
+++ trafficserver/traffic/trunk/build/lzma.m4 Mon May 17 04:52:42 2010
@@ -0,0 +1,103 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl lzma.m4: Trafficserver's lzma autoconf macros
+dnl
+
+dnl
+dnl ATS_CHECK_LZMA: look for lzma libraries and headers
+dnl
+AC_DEFUN([ATS_CHECK_LZMA], [
+enable_lzma=no
+AC_ARG_WITH(lzma, [AC_HELP_STRING([--with-lzma=DIR],[use a specific lzma library])],
+[
+ if test "x$withval" != "xyes" && test "x$withval" != "x"; then
+ lzma_base_dir="$withval"
+ if test "$withval" != "no"; then
+ enable_lzma=yes
+ case "$withval" in
+ *":"*)
+ lzma_include="`echo $withval |sed -e 's/:.*$//'`"
+ lzma_ldflags="`echo $withval |sed -e 's/^.*://'`"
+ AC_MSG_CHECKING(checking for lzma includes in $lzma_include libs in $lzma_ldflags )
+ ;;
+ *)
+ lzma_include="$withval/include"
+ lzma_ldflags="$withval/lib"
+ AC_MSG_CHECKING(checking for lzma includes in $withval)
+ ;;
+ esac
+ fi
+ fi
+])
+
+if test "x$lzma_base_dir" = "x"; then
+ AC_MSG_CHECKING([for lzma location])
+ AC_CACHE_VAL(cv_lzma_dir,[
+ for dir in /usr/local /usr ; do
+ if test -d $dir && test -f $dir/include/lzma.h; then
+ cv_lzma_dir=$dir
+ break
+ fi
+ done
+ ])
+ lzma_base_dir=$cv_lzma_dir
+ if test "x$lzma_base_dir" = "x"; then
+ enable_lzma=no
+ AC_MSG_RESULT([not found])
+ else
+ enable_lzma=yes
+ lzma_include="$lzma_base_dir/include"
+ lzma_ldflags="$lzma_base_dir/lib"
+ AC_MSG_RESULT([$lzma_base_dir])
+ fi
+else
+ if test -d $lzma_include && test -d $lzma_ldflags && test -f $lzma_include/lzma.h; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+fi
+
+if test "$enable_lzma" != "no"; then
+ saved_ldflags=$LDFLAGS
+ saved_cppflags=$CPPFLAGS
+ lzma_have_headers=0
+ lzma_have_libs=0
+ if test "$lzma_base_dir" != "/usr"; then
+ ATS_ADDTO(CPPFLAGS, [-I${lzma_include}])
+ ATS_ADDTO(LDFLAGS, [-L${lzma_ldflags}])
+ case $host_os in
+ solaris*)
+ ATS_ADDTO(LDFLAGS, [-R${lzma_ldflags}])
+ ;;
+ esac
+ fi
+ AC_CHECK_LIB(lzma, lzma_code, [lzma_have_libs=1])
+ if test "$lzma_have_libs" != "0"; then
+ AC_CHECK_HEADERS(lzma.h, [lzma_have_headers=1])
+ fi
+ if test "$lzma_have_headers" != "0"; then
+ AC_DEFINE(HAVE_LZMA,1,[Compiling with LZMA support])
+ ATS_ADDTO(LIBS, [-llzma])
+ else
+ enable_lzma=no
+ CPPFLAGS=$saved_cppflags
+ LDFLAGS=$saved_ldflags
+ fi
+fi
+])
Propchange: trafficserver/traffic/trunk/build/lzma.m4
------------------------------------------------------------------------------
svn:eol-style = native
Added: trafficserver/traffic/trunk/build/network.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/network.m4?rev=944969&view=auto
==============================================================================
--- trafficserver/traffic/trunk/build/network.m4 (added)
+++ trafficserver/traffic/trunk/build/network.m4 Mon May 17 04:52:42 2010
@@ -0,0 +1,87 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl -----------------------------------------------------------------
+dnl network.m4: Trafficserver's autoconf macros for testing network support
+dnl
+
+dnl
+dnl Checks the definition of gethostbyname_r and gethostbyaddr_r
+dnl which are different for glibc, solaris and assorted other operating
+dnl systems
+dnl
+dnl Note that this test is executed too early to see if we have all of
+dnl the headers.
+AC_DEFUN([ATS_CHECK_GETHOSTBYNAME_R_STYLE], [
+
+dnl Try and compile a glibc2 gethostbyname_r piece of code, and set the
+dnl style of the routines to glibc2 on success
+AC_CACHE_CHECK([style of gethostbyname_r routine], ac_cv_gethostbyname_r_style,
+ATS_TRY_COMPILE_NO_WARNING([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+],[
+int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
+ (char *) 0, 0, (struct hostent **) 0, &tmp);
+/* use tmp to suppress the warning */
+tmp=0;
+], ac_cv_gethostbyname_r_style=glibc2, ac_cv_gethostbyname_r_style=none))
+
+if test "$ac_cv_gethostbyname_r_style" = "glibc2"; then
+ AC_DEFINE(GETHOSTBYNAME_R_GLIBC2, 1, [Define if gethostbyname_r has the glibc style])
+fi
+
+AC_CACHE_CHECK([3rd argument to the gethostbyname_r routines], ac_cv_gethostbyname_r_arg,
+ATS_TRY_COMPILE_NO_WARNING([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+],[
+int tmp = gethostbyname_r((const char *) 0, (struct hostent *) 0,
+ (struct hostent_data *) 0);
+/* use tmp to suppress the warning */
+tmp=0;
+], ac_cv_gethostbyname_r_arg=hostent_data, ac_cv_gethostbyname_r_arg=char))
+
+if test "$ac_cv_gethostbyname_r_arg" = "hostent_data"; then
+ AC_DEFINE(GETHOSTBYNAME_R_HOSTENT_DATA, 1, [Define if gethostbyname_r has the hostent_data for the third argument])
+fi
+])
Propchange: trafficserver/traffic/trunk/build/network.m4
------------------------------------------------------------------------------
svn:eol-style = native
Added: trafficserver/traffic/trunk/build/pcre.m4
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/build/pcre.m4?rev=944969&view=auto
==============================================================================
--- trafficserver/traffic/trunk/build/pcre.m4 (added)
+++ trafficserver/traffic/trunk/build/pcre.m4 Mon May 17 04:52:42 2010
@@ -0,0 +1,104 @@
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl pcre.m4: Trafficserver's pcre autoconf macros
+dnl
+
+dnl
+dnl ATS_CHECK_PCRE: look for pcre libraries and headers
+dnl
+AC_DEFUN([ATS_CHECK_PCRE], [
+enable_pcre=no
+AC_ARG_WITH(pcre, [AC_HELP_STRING([--with-pcre=DIR],[use a specific pcre library])],
+[
+ if test "x$withval" != "xyes" && test "x$withval" != "x"; then
+ pcre_base_dir="$withval"
+ if test "$withval" != "no"; then
+ enable_pcre=yes
+ case "$withval" in
+ *":"*)
+ pcre_include="`echo $withval |sed -e 's/:.*$//'`"
+ pcre_ldflags="`echo $withval |sed -e 's/^.*://'`"
+ AC_MSG_CHECKING(checking for pcre includes in $pcre_include libs in $pcre_ldflags )
+ ;;
+ *)
+ pcre_include="$withval/include"
+ pcre_ldflags="$withval/lib"
+ AC_MSG_CHECKING(checking for pcre includes in $withval)
+ ;;
+ esac
+ fi
+ fi
+])
+
+if test "x$pcre_base_dir" = "x"; then
+ AC_MSG_CHECKING([for pcre location])
+ AC_CACHE_VAL(cv_pcre_dir,[
+ for dir in /usr/local /usr ; do
+ if test -d $dir && ( test -f $dir/include/pcre.h || test -f $dir/include/pcre/pcre.h ); then
+ cv_pcre_dir=$dir
+ break
+ fi
+ done
+ ])
+ pcre_base_dir=$cv_pcre_dir
+ if test "x$pcre_base_dir" = "x"; then
+ enable_pcre=no
+ AC_MSG_RESULT([not found])
+ else
+ enable_pcre=yes
+ pcre_include="$pcre_base_dir/include"
+ pcre_ldflags="$pcre_base_dir/lib"
+ AC_MSG_RESULT([$pcre_base_dir])
+ fi
+else
+ if test -d $pcre_include && test -d $pcre_ldflags && ( test -f $pcre_include/pcre.h || test -f $pcre_include/pcre/pcre.h ); then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([not found])
+ fi
+fi
+
+if test "$enable_pcre" != "no"; then
+ saved_ldflags=$LDFLAGS
+ saved_cppflags=$CPPFLAGS
+ pcre_have_headers=0
+ pcre_have_libs=0
+ if test "$pcre_base_dir" != "/usr"; then
+ ATS_ADDTO(CPPFLAGS, [-I${pcre_include}])
+ ATS_ADDTO(LDFLAGS, [-L${pcre_ldflags}])
+ case $host_os in
+ solaris*)
+ ATS_ADDTO(LDFLAGS, [-R${pcre_ldflags}])
+ ;;
+ esac
+ fi
+ AC_CHECK_LIB(pcre, pcre_exec, [pcre_have_libs=1])
+ if test "$pcre_have_libs" != "0"; then
+ AC_CHECK_HEADERS(pcre.h, [pcre_have_headers=1])
+ AC_CHECK_HEADERS(pcre/pcre.h, [pcre_have_headers=1])
+ fi
+ if test "$pcre_have_headers" != "0"; then
+ AC_DEFINE(HAVE_LIBPCRE,1,[Compiling with pcre support])
+ AC_SUBST(LIBPCRE, [-lpcre])
+ else
+ enable_pcre=no
+ CPPFLAGS=$saved_cppflags
+ LDFLAGS=$saved_ldflags
+ fi
+fi
+])
Propchange: trafficserver/traffic/trunk/build/pcre.m4
------------------------------------------------------------------------------
svn:eol-style = native