Commit 384e5d74 by Maarten L. Hekkelman

fix in configure for new header file in libcifpp, regex library

parent a21ad93c
...@@ -33,7 +33,8 @@ LIBS = @LIBS@ \ ...@@ -33,7 +33,8 @@ LIBS = @LIBS@ \
@CIFPP_LIBS@ \ @CIFPP_LIBS@ \
@BOOST_IOSTREAMS_LIB@ \ @BOOST_IOSTREAMS_LIB@ \
@BOOST_PROGRAM_OPTIONS_LIB@ \ @BOOST_PROGRAM_OPTIONS_LIB@ \
@BOOST_DATE_TIME_LIB@ @BOOST_DATE_TIME_LIB@ \
@BOOST_REGEX_LIB@
prefix = $(DESTDIR)@prefix@ prefix = $(DESTDIR)@prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
......
...@@ -632,6 +632,7 @@ AX_PACKAGE_REQUIRES ...@@ -632,6 +632,7 @@ AX_PACKAGE_REQUIRES
CIFPP_RSRC CIFPP_RSRC
CIFPP_LIBS CIFPP_LIBS
CIFPP_CFLAGS CIFPP_CFLAGS
BOOST_REGEX_LIB
BOOST_DATE_TIME_LIB BOOST_DATE_TIME_LIB
BOOST_PROGRAM_OPTIONS_LIB BOOST_PROGRAM_OPTIONS_LIB
BOOST_IOSTREAMS_LIB BOOST_IOSTREAMS_LIB
...@@ -724,6 +725,7 @@ with_boost_libdir ...@@ -724,6 +725,7 @@ with_boost_libdir
with_boost_iostreams with_boost_iostreams
with_boost_program_options with_boost_program_options
with_boost_date_time with_boost_date_time
with_boost_regex
with_cif__ with_cif__
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
...@@ -1402,6 +1404,10 @@ Optional Packages: ...@@ -1402,6 +1404,10 @@ Optional Packages:
possible to specify a certain library for the linker possible to specify a certain library for the linker
e.g. e.g.
--with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1
--with-boost-regex[=special-lib]
use the Regex library from boost - it is possible to
specify a certain library for the linker e.g.
--with-boost-regex=boost_regex-gcc-mt-d-1_33_1
--with-cif++=[location] Use the cif++ library as specified. --with-cif++=[location] Use the cif++ library as specified.
Some influential environment variables: Some influential environment variables:
...@@ -7063,6 +7069,233 @@ fi ...@@ -7063,6 +7069,233 @@ fi
fi fi
# Check whether --with-boost-regex was given.
if test "${with_boost_regex+set}" = set; then :
withval=$with_boost_regex;
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_regex_lib=""
else
want_boost="yes"
ax_boost_user_regex_lib="$withval"
fi
else
want_boost="yes"
fi
if test "x$want_boost" = "xyes"; then
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Boost::Regex library is available" >&5
$as_echo_n "checking whether the Boost::Regex library is available... " >&6; }
if ${ax_cv_boost_regex+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <boost/regex.hpp>
int
main ()
{
boost::regex r(); return 0;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ax_cv_boost_regex=yes
else
ax_cv_boost_regex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_boost_regex" >&5
$as_echo "$ax_cv_boost_regex" >&6; }
if test "x$ax_cv_boost_regex" = "xyes"; then
$as_echo "#define HAVE_BOOST_REGEX /**/" >>confdefs.h
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/[^\/]*//'`
if test "x$ax_boost_user_regex_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_regex="no"
fi
done
if test "x$link_regex" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_exit" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for exit in -l$ax_lib" >&5
$as_echo_n "checking for exit in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char exit ();
int
main ()
{
return exit ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_regex="no"
fi
done
fi
else
for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do
as_ac_Lib=`$as_echo "ac_cv_lib_$ax_lib''_main" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$ax_lib" >&5
$as_echo_n "checking for main in -l$ax_lib... " >&6; }
if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$ax_lib $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
eval "$as_ac_Lib=yes"
else
eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
BOOST_REGEX_LIB="-l$ax_lib"; link_regex="yes"; break
else
link_regex="no"
fi
done
fi
if test "x$ax_lib" = "x"; then
as_fn_error $? "Could not find a version of the Boost::Regex library!" "$LINENO" 5
fi
if test "x$link_regex" != "xyes"; then
as_fn_error $? "Could not link against $ax_lib !" "$LINENO" 5
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
...@@ -7181,8 +7414,8 @@ fi ...@@ -7181,8 +7414,8 @@ fi
else else
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Config.hpp" "ac_cv_header_cifpp_Config_hpp" "$ac_includes_default" ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Cif++.hpp" "ac_cv_header_cifpp_Cifpp_hpp" "$ac_includes_default"
if test "x$ac_cv_header_cifpp_Config_hpp" = xyes; then : if test "x$ac_cv_header_cifpp_Cifpp_hpp" = xyes; then :
else else
...@@ -7213,8 +7446,8 @@ fi ...@@ -7213,8 +7446,8 @@ fi
LDFLAGS="$LDFLAGS $CIFPP_LDFLAGS" LDFLAGS="$LDFLAGS $CIFPP_LDFLAGS"
fi fi
ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Config.hpp" "ac_cv_header_cifpp_Config_hpp" "$ac_includes_default" ac_fn_cxx_check_header_mongrel "$LINENO" "cif++/Cif++.hpp" "ac_cv_header_cifpp_Cifpp_hpp" "$ac_includes_default"
if test "x$ac_cv_header_cifpp_Config_hpp" = xyes; then : if test "x$ac_cv_header_cifpp_Cifpp_hpp" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcifpp" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcifpp" >&5
$as_echo_n "checking for main in -lcifpp... " >&6; } $as_echo_n "checking for main in -lcifpp... " >&6; }
......
...@@ -87,6 +87,7 @@ AX_BOOST_BASE([1.65.1], [], [AC_MSG_ERROR([Could not find a recent version of bo ...@@ -87,6 +87,7 @@ AX_BOOST_BASE([1.65.1], [], [AC_MSG_ERROR([Could not find a recent version of bo
AX_BOOST_IOSTREAMS AX_BOOST_IOSTREAMS
AX_BOOST_PROGRAM_OPTIONS AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_DATE_TIME AX_BOOST_DATE_TIME
AX_BOOST_REGEX
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
...@@ -117,7 +118,7 @@ AS_IF([test "x$CIFPP_LIBS" = "x"], [ ...@@ -117,7 +118,7 @@ AS_IF([test "x$CIFPP_LIBS" = "x"], [
AX_PKG_CHECK_MODULES([CIFPP], [libcifpp], [], [], [AC_MSG_ERROR([the required package libcifpp is not installed])]) AX_PKG_CHECK_MODULES([CIFPP], [libcifpp], [], [], [AC_MSG_ERROR([the required package libcifpp is not installed])])
else else
AC_CHECK_HEADER( AC_CHECK_HEADER(
[cif++/Config.hpp], [cif++/Cif++.hpp],
[ [
dnl CIFPP_CFLAGS="-I ${withval}/include" dnl CIFPP_CFLAGS="-I ${withval}/include"
], ],
...@@ -126,7 +127,7 @@ Can't find the libcif++ header, Config.hpp. Make sure that it ...@@ -126,7 +127,7 @@ Can't find the libcif++ header, Config.hpp. Make sure that it
is installed, and either use the --with-cif++ option or install is installed, and either use the --with-cif++ option or install
pkg-config.])]) pkg-config.])])
AX_CHECK_LIBRARY([CIFPP], [cif++/Config.hpp], [cifpp], AX_CHECK_LIBRARY([CIFPP], [cif++/Cif++.hpp], [cifpp],
[ [
LIBS="-lcifpp $LIBS" LIBS="-lcifpp $LIBS"
], ],
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
/* define if the Boost::PROGRAM_OPTIONS library is available */ /* define if the Boost::PROGRAM_OPTIONS library is available */
#undef HAVE_BOOST_PROGRAM_OPTIONS #undef HAVE_BOOST_PROGRAM_OPTIONS
/* define if the Boost::Regex library is available */
#undef HAVE_BOOST_REGEX
/* Define to 1 if CIFPP is found */ /* Define to 1 if CIFPP is found */
#undef HAVE_CIFPP #undef HAVE_CIFPP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment