From 0757a0cddd4df0153508069f47286cbc415f56c3 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 4 Mar 2010 09:57:07 +0100 Subject: [PATCH] add --with-system-libltdl --- configure.ac | 16 ++++++++++++++++ lib-src/Makefile.am | 6 +++--- lib-src/{ltdl.h => ltdl_.h} | 0 libgst/Makefile.am | 6 +++--- 4 files changed, 22 insertions(+), 6 deletions(-) rename lib-src/{ltdl.h => ltdl_.h} (100%) diff --git a/configure.ac b/configure.ac index 5a55a5385..f4fcd7139 100644 --- a/configure.ac +++ b/configure.ac @@ -100,6 +100,22 @@ AM_MISSING_PROG(AUTOM4TE, autom4te, $missing_dir) dnl dnl ------------------------------ SUBDIRS -------------------- +AC_ARG_WITH(system-libltdl, +[ --with-system-libltdl[=PATH] use system libltdl.la (search in PATH if given)], +[], [with_system_libltdl=no]) + +if test $with_system_libltdl = no; then + AC_LIBOBJ(ltdl) + AC_CONFIG_LINKS([lib-src/ltdl.h:lib-src/ltdl_.h]) + INCLTDL= LIBLTDL= +elif test $with_system_libltdl = yes; then + INCLTDL= LIBLTDL=-lltdl +else + INCLTDL="-I$withval/../include" LIBLTDL="-L$withval -lltdl" +fi +AC_SUBST(INCLTDL) +AC_SUBST(LIBLTDL) + AC_ARG_WITH(system-libffi, [ --with-system-libffi[=PATH] use system libffi.la (search in PATH if given)], [], [with_system_libffi=no]) diff --git a/lib-src/Makefile.am b/lib-src/Makefile.am index 5f0335aa2..3494ddfcf 100644 --- a/lib-src/Makefile.am +++ b/lib-src/Makefile.am @@ -6,12 +6,12 @@ library_la_DEPENDENCIES = @LTLIBOBJS@ @LTALLOCA@ # These are to be included *always*, the rest are driven by configure.in library_la_SOURCES = \ qsort.c getopt.c getopt1.c md5.c avltrees.c rbtrees.c lock.c \ - strspell.c ltdl.c regex.c socketx.c pointer-set.c + strspell.c regex.c socketx.c pointer-set.c noinst_HEADERS = \ obstack.h poll_.h getopt.h md5.h ansidecl.h strspell.h lock.h \ mathl.h trigl.h avltrees.h rbtrees.h trigl.c sincosl.c getaddrinfo.h \ - socketx.h ltdl.h regex.h pointer-set.h + socketx.h ltdl_.h regex.h pointer-set.h -DISTCLEANFILES = poll.h +DISTCLEANFILES = poll.h ltdl.h diff --git a/lib-src/ltdl.h b/lib-src/ltdl_.h similarity index 100% rename from lib-src/ltdl.h rename to lib-src/ltdl_.h diff --git a/libgst/Makefile.am b/libgst/Makefile.am index 40fb917cf..3701b449e 100644 --- a/libgst/Makefile.am +++ b/libgst/Makefile.am @@ -5,7 +5,7 @@ AM_LFLAGS = -Cfe -o$(LEX_OUTPUT_ROOT).c AM_YFLAGS = -vy AM_CPPFLAGS = $(RELOC_CPPFLAGS) \ -I$(top_srcdir)/lib-src -I$(top_builddir)/lib-src \ - $(INCFFI) $(INCLIGHTNING) $(INCSNPRINTFV) $(INCSIGSEGV) + $(INCFFI) $(INCLIGHTNING) $(INCSNPRINTFV) $(INCSIGSEGV) $(INCLTDL) if !HAVE_INSTALLED_LIGHTNING AM_CPPFLAGS += -I$(top_srcdir)/lightning -I$(top_builddir)/lightning \ @@ -21,8 +21,8 @@ CLEANFILES = genprims$(EXEEXT) genbc$(EXEEXT) genvm$(EXEEXT) \ # definitions for libgst.la libgst_la_LIBADD=$(top_builddir)/lib-src/library.la $(SOCKET_LIBS) \ - $(LIBSIGSEGV) $(LIBFFI) $(LIBSNPRINTFV) $(LIBREADLINE) $(LIBGMP) \ - $(LIBTHREAD) + $(LIBSIGSEGV) $(LIBFFI) $(LIBSNPRINTFV) $(LIBREADLINE) $(LIBLTDL) \ + $(LIBGMP) $(LIBTHREAD) libgst_la_DEPENDENCIES=$(top_builddir)/lib-src/library.la $(LIBSNPRINTFV)