From 326310ca9fd794616463f49f5eb274bf5a9b82ab Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 19 Nov 2012 05:23:46 +0000 Subject: [PATCH] merged configure fix from RC_0_16 --- autotool.sh | 15 ++ configure.ac | 36 ++++ m4/config.rpath | 543 ++++++++++++++++++++++++++++++++++++++++++++++++ m4/iconv.m4 | 103 +++++++++ 4 files changed, 697 insertions(+) create mode 100644 m4/config.rpath create mode 100644 m4/iconv.m4 diff --git a/autotool.sh b/autotool.sh index 0301f1397..5aa0cac4c 100755 --- a/autotool.sh +++ b/autotool.sh @@ -140,6 +140,21 @@ ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` version_check libtool LIBTOOLIZE "libtoolize glibtoolize" $REQUIRED_LIBTOOL_VERSION || exit 1 +########################################## +# Copy config.rpath to build dir +########################################## +build_dir=`cat $configure_ac | grep '^AC_CONFIG_AUX_DIR' | +sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` + +if [ -n "$build_dir" ]; then + mkdir $build_dir +fi +config_rpath=m4/config.rpath +echo "Copying $config_rpath to $build_dir" +cp $config_rpath "$build_dir/" + +########################################## + echo printbold "Processing $configure_ac" echo diff --git a/configure.ac b/configure.ac index a62345de1..cdcbf6b5c 100644 --- a/configure.ac +++ b/configure.ac @@ -308,6 +308,14 @@ AC_ARG_WITH( [[ARG_WITH_LIBGEOIP=no]] ) +AC_ARG_WITH( + [libiconv], + [AS_HELP_STRING( + [--with-libiconv], + [enable linking against system libiconv [default=no]])], + [[ARG_WITH_LIBICONV=$withval]], + [[ARG_WITH_LIBICONV=no]] +) ############################################################################### # Checking configure options @@ -570,6 +578,25 @@ AS_CASE(["$ARG_WITH_LIBGEOIP"], AC_MSG_ERROR([Unknown option "$ARG_WITH_LIBGEOIP". Use either "yes" or "no".])] ) +AC_MSG_CHECKING([whether to link against system libiconv]) +AS_CASE(["$ARG_WITH_LIBICONV"], + ["yes"], [ + AC_MSG_RESULT([yes]) + AM_ICONV() + AS_IF([test "x$am_cv_func_iconv" = "xyes"], [ + ICONV_LIBS=$LTLIBICONV + AC_SUBST([ICONV_LIBS]) + LIBS="$ICONV_LIBS $LIBS" + ], [ + AC_MSG_ERROR([Iconv library not found.]) + ]) + ], + ["no"], [ + ARG_WITH_LIBICONV="no" + ], + [AC_MSG_RESULT([$ARG_WITH_LIBICONV]) + AC_MSG_ERROR([Unknown option "$ARG_WITH_LIBICONV". Use either "yes" or "no".])] +) ############################################################################### # Setting conditional variables for Makefiles @@ -736,6 +763,7 @@ cat >> config.report << END External libraries: system libgeoip: ${ARG_WITH_LIBGEOIP:-no} + system libiconv: ${ARG_WITH_LIBICONV:-no} END AS_IF([test "x$ARG_WITH_LIBGEOIP" = "xyes"], [ @@ -747,6 +775,14 @@ GeoIP library: END ]) +AS_IF([test "x$ARG_WITH_LIBICONV" = "xyes"], [ +cat >> config.report << END + +Iconv library: + Iconv Libs: ${ICONV_LIBS} +END +]) + AS_IF([test "x$ARG_ENABLE_ENCRYPTION" = "xyes"], [ cat >> config.report << END diff --git a/m4/config.rpath b/m4/config.rpath new file mode 100644 index 000000000..4dea75957 --- /dev/null +++ b/m4/config.rpath @@ -0,0 +1,543 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2003 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribuHTTP/1.1 200 OK Set-Cookie: i_like_gitea=e2ce1566c5d19e15; Path=/; HttpOnly; Secure; SameSite=Lax Set-Cookie: _csrf=mIvtkC41spfeoQ36BB9iLGQKPQc6MTc1MzI2ODUyNzk4NTAyODE4NQ; Path=/; Max-Age=86400; HttpOnly; Secure; SameSite=Lax X-Frame-Options: SAMEORIGIN Date: Wed, 23 Jul 2025 11:02:08 GMT Content-Type: text/plain; charset=utf-8 Connection: close Transfer-Encoding: chunked Cache-Control: max-age=0, private, must-revalidate, no-transform X-Cache-Status: HIT X-Cache-Age: 0 57cb From 326310ca9fd794616463f49f5eb274bf5a9b82ab Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 19 Nov 2012 05:23:46 +0000 Subject: [PATCH] merged configure fix from RC_0_16 --- autotool.sh | 15 ++ configure.ac | 36 ++++ m4/config.rpath | 543 ++++++++++++++++++++++++++++++++++++++++++++++++ m4/iconv.m4 | 103 +++++++++ 4 files changed, 697 insertions(+) create mode 100644 m4/config.rpath create mode 100644 m4/iconv.m4 diff --git a/autotool.sh b/autotool.sh index 0301f1397..5aa0cac4c 100755 --- a/autotool.sh +++ b/autotool.sh @@ -140,6 +140,21 @@ ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` version_check libtool LIBTOOLIZE "libtoolize glibtoolize" $REQUIRED_LIBTOOL_VERSION || exit 1 +########################################## +# Copy config.rpath to build dir +########################################## +build_dir=`cat $configure_ac | grep '^AC_CONFIG_AUX_DIR' | +sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` + +if [ -n "$build_dir" ]; then + mkdir $build_dir +fi +config_rpath=m4/config.rpath +echo "Copying $config_rpath to $build_dir" +cp $config_rpath "$build_dir/" + +########################################## + echo printbold "Processing $configure_ac" echo diff --git a/configure.ac b/configure.ac index a62345de1..cdcbf6b5c 100644 --- a/configure.ac +++ b/configure.ac @@ -308,6 +308,14 @@ AC_ARG_WITH( [[ARG_WITH_LIBGEOIP=no]] ) +AC_ARG_WITH( + [libiconv], + [AS_HELP_STRING( + [--with-libiconv], + [enable linking against system libiconv [default=no]])], + [[ARG_WITH_LIBICONV=$withval]], + [[ARG_WITH_LIBICONV=no]] +) ############################################################################### # Checking configure options @@ -570,6 +578,25 @@ AS_CASE(["$ARG_WITH_LIBGEOIP"], AC_MSG_ERROR([Unknown option "$ARG_WITH_LIBGEOIP". Use either "yes" or "no".])] ) +AC_MSG_CHECKING([whether to link against system libiconv]) +AS_CASE(["$ARG_WITH_LIBICONV"], + ["yes"], [ + AC_MSG_RESULT([yes]) + AM_ICONV() + AS_IF([test "x$am_cv_func_iconv" = "xyes"], [ + ICONV_LIBS=$LTLIBICONV + AC_SUBST([ICONV_LIBS]) + LIBS="$ICONV_LIBS $LIBS" + ], [ + AC_MSG_ERROR([Iconv library not found.]) + ]) + ], + ["no"], [ + ARG_WITH_LIBICONV="no" + ], + [AC_MSG_RESULT([$ARG_WITH_LIBICONV]) + AC_MSG_ERROR([Unknown option "$ARG_WITH_LIBICONV". Use either "yes" or "no".])] +) ############################################################################### # Setting conditional variables for Makefiles @@ -736,6 +763,7 @@ cat >> config.report << END External libraries: system libgeoip: ${ARG_WITH_LIBGEOIP:-no} + system libiconv: ${ARG_WITH_LIBICONV:-no} END AS_IF([test "x$ARG_WITH_LIBGEOIP" = "xyes"], [ @@ -747,6 +775,14 @@ GeoIP library: END ]) +AS_IF([test "x$ARG_WITH_LIBICONV" = "xyes"], [ +cat >> config.report << END + +Iconv library: + Iconv Libs: ${ICONV_LIBS} +END +]) + AS_IF([test "x$ARG_ENABLE_ENCRYPTION" = "xyes"], [ cat >> config.report << END diff --git a/m4/config.rpath b/m4/config.rpath new file mode 100644 index 000000000..4dea75957 --- /dev/null +++ b/m4/config.rpath @@ -0,0 +1,543 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2003 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribu 0