From: Alan T. DeKok Date: Thu, 13 Sep 2012 13:00:13 +0000 (+0200) Subject: Hacks to make it work with jlibtool X-Git-Tag: release_3_0_0_beta1~1716 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8fde26940e87ec544b0671fe12bf5f90963efc0;p=thirdparty%2Ffreeradius-server.git Hacks to make it work with jlibtool --- diff --git a/Make.inc.in b/Make.inc.in index 373fb9a9810..c42211ba91d 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -59,8 +59,11 @@ LIBLTDL = @LIBLTDL@ INCLTDL = @INCLTDL@ CFLAGS += $(INCLTDL) -USE_SHARED_LIBS = @USE_SHARED_LIBS@ -USE_STATIC_LIBS = @USE_STATIC_LIBS@ +#USE_SHARED_LIBS = @USE_SHARED_LIBS@ +#USE_STATIC_LIBS = @USE_STATIC_LIBS@ + +USE_SHARED_LIBS = yes +USE_STATIC_LIBS = yes STATIC_MODULES = @STATIC_MODULES@ OPENSSL_LIBS = @OPENSSL_LIBS@ @@ -144,3 +147,8 @@ ifneq "$(findstring Darwin,$(shell uname -a))" "" LA := dylib endif endif + +all: $(top_srcdir)/scripts/jlibtool + +$(top_srcdir)/scripts/jlibtool: $(top_srcdir)/scripts/jlibtool.c + $(CC) $^ -o $@ diff --git a/Makefile b/Makefile index ce04c4b2cda..a26c73ac045 100644 --- a/Makefile +++ b/Makefile @@ -23,30 +23,9 @@ BOILERMAKE=$(subst 3.8,yes,$(subst 3.80,,$(MAKE_VERSION))) # The version of GNU Make is too old, don't use it. ifeq "" "$(findstring yes,$(BOILERMAKE))" -BOILERMAKE= +$(error The build system requires GNU Make 3.81 or later.) endif -# Static-only builds still require libtool. -# This is because it does all kinds of preload magic in order -# to force the linker to put the libraries into the main binary. -# We don't support that yet, so we miss it... -ifneq "$(USE_SHARED_LIBS)" "yes" -BOILERMAKE= -endif -endif - -# If possible, drastically decrease the build time. -# The new build system means that -ifneq "" "$(BOILERMAKE)" - -# Don't use libtool or libltdl. -# They are a blight upon the face of the earth. -LIBLTDL := -INCLTDL := -CFLAGS += -LIBTOOL := JLIBTOOL -LTDL_SUBDIRS := - export DESTDIR := $(R) # And over-ride all of the other magic. @@ -64,16 +43,6 @@ all: clean: @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common @rm -f *~ - -ifeq "scripts/jlibtool" "$(JLIBTOOL)" -all: scripts/jlibtool - -scripts/jlibtool: scripts/jlibtool.c - $(CC) $^ -o $@ - -LIBTOOL := $(top_srcdir)/scripts/jlibtool -endif - endif .PHONY: tests diff --git a/configure b/configure index 15f93a11e75..a9ec96ae33a 100755 --- a/configure +++ b/configure @@ -15130,7 +15130,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu else - LIBTOOL="`pwd`/libtool" + LIBTOOL='${top_srcdir}/scripts/jlibtool' enable_dlopen=yes diff --git a/configure.in b/configure.in index 7751d7e158d..e31292a4821 100644 --- a/configure.in +++ b/configure.in @@ -93,13 +93,10 @@ AC_ARG_WITH(system-libtool, [ AC_PATH_PROG(LIBTOOL, libtool,,$PATH:/usr/local/bin) AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL], [ - LIBTOOL="`pwd`/libtool" + LIBTOOL='${top_srcdir}/scripts/jlibtool' AC_SUBST(LIBTOOL) dnl ensure that we're looking for dlopen AC_LIBTOOL_DLOPEN - - dnl Figure out how to build shared libraries - AC_PROG_LIBTOOL ]) diff --git a/src/main/Makefile.in b/src/main/Makefile.in index 33a7efbbe47..0f093e17671 100644 --- a/src/main/Makefile.in +++ b/src/main/Makefile.in @@ -66,7 +66,7 @@ all: $(BINARIES) $(SERVER_OBJS): $(INCLUDES) radiusd$(EXEEXT): $(SERVER_OBJS) $(MODULE_OBJS) $(LIBRADIUS) - $(LIBTOOL) --quiet --mode=link $(CC) -export-dynamic -dlopen self \ + $(LIBTOOL) --quiet --mode=link $(CC) -export-dynamic \ $(LDFLAGS) $(LINK_MODE) -o $@ $(SERVER_OBJS) \ $(MODULE_LIBS) $(LIBRADIUS) $(LIBS) $(SNMP_LIBS) \ $(LCRYPT) $(PTHREADLIB) $(LIBLTDL) $(OPENSSL_LIBS)