From 39b94fee4304d56babf5bd62e10c5786a79f4389 Mon Sep 17 00:00:00 2001 From: Neil Jerram Date: Sun, 14 Jun 2009 17:58:15 +0100 Subject: [PATCH 1/1] Provide easier configure options for GMP and readline This patch uses the AC_LIB_LINKFLAGS macro, provided by Gnulib's havelib module, to provide --with-gmp-prefix and --with-readline-prefix configure options. Many thanks to Bruno Haible for suggesting and explaining this to me. * configure.in (top level): Add AC_LIB_LINKFLAGS(gmp). * guile-readline/configure.in (AC_CONFIG_AUX_DIR): Change to ../build-aux, to share the main build-aux directory and so avoid having to distribute multiple copies of config.rpath. (top level): Add AC_LIB_LINKFLAGS(readline). * lib/Makefile.am, m4/gnulib-cache.m4: Regenerated by gnulib-tool for new import of the `havelib' module. --- configure.in | 1 + guile-readline/configure.in | 3 ++- lib/Makefile.am | 2 +- m4/gnulib-cache.m4 | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 6568e524f..480263d66 100644 --- a/configure.in +++ b/configure.in @@ -827,6 +827,7 @@ fi dnl GMP tests +AC_LIB_LINKFLAGS(gmp) AC_CHECK_LIB([gmp], [__gmpz_init], , [AC_MSG_ERROR([GNU MP not found, see README])]) diff --git a/guile-readline/configure.in b/guile-readline/configure.in index 9098a31e6..d05356618 100644 --- a/guile-readline/configure.in +++ b/guile-readline/configure.in @@ -7,7 +7,7 @@ AC_INIT(guile-readline, ]), [bug-guile@gnu.org]) -AC_CONFIG_AUX_DIR([.]) +AC_CONFIG_AUX_DIR([../build-aux]) AC_CONFIG_SRCDIR(readline.c) AM_CONFIG_HEADER([guile-readline-config.h]) AM_INIT_AUTOMAKE([foreign no-define]) @@ -38,6 +38,7 @@ for termlib in ncurses curses termcap terminfo termlib ; do [LIBS="-l${termlib} $LIBS"; break]) done +AC_LIB_LINKFLAGS(readline) AC_CHECK_LIB(readline, readline) if test $ac_cv_lib_readline_readline = no; then AC_MSG_WARN([libreadline was not found on your system.]) diff --git a/lib/Makefile.am b/lib/Makefile.am index 6f2f5c5fa..704c2bcaa 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap count-one-bits environ extensions flock fpieee full-read full-write iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap count-one-bits environ extensions flock fpieee full-read full-write havelib iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4 index 0fbe11969..a45029493 100644 --- a/m4/gnulib-cache.m4 +++ b/m4/gnulib-cache.m4 @@ -15,7 +15,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap count-one-bits environ extensions flock fpieee full-read full-write iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string +# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alloca-opt autobuild byteswap count-one-bits environ extensions flock fpieee full-read full-write havelib iconv_open-utf lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) @@ -30,6 +30,7 @@ gl_MODULES([ fpieee full-read full-write + havelib iconv_open-utf lib-symbol-visibility libunistring -- 2.20.1