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@
LA := dylib
endif
endif
+
+all: $(top_srcdir)/scripts/jlibtool
+
+$(top_srcdir)/scripts/jlibtool: $(top_srcdir)/scripts/jlibtool.c
+ $(CC) $^ -o $@
# 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.
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
else
- LIBTOOL="`pwd`/libtool"
+ LIBTOOL='${top_srcdir}/scripts/jlibtool'
enable_dlopen=yes
[ 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
])
$(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)