]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9008 moduledir rpath changes
authorEmily Backes <ebackes@symas.com>
Fri, 6 Feb 2015 02:16:55 +0000 (18:16 -0800)
committerOndřej Kuzník <ondra@openldap.org>
Wed, 24 Apr 2019 09:15:37 +0000 (10:15 +0100)
build/top.mk
configure.in

index 2420510c79c1c910df9b33cf8cba102d71718521..ddfa48777dffb56436b1e3d5f761b9c2c0611e9f 100644 (file)
@@ -40,7 +40,7 @@ libdir = @libdir@
 libexecdir = @libexecdir@
 localstatedir = @localstatedir@
 mandir = @mandir@
-moduledir = @libexecdir@$(ldap_subdir)
+moduledir = @moduledir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@$(ldap_subdir)
@@ -87,10 +87,12 @@ LTONLY_mod = --tag=disable-static
 LTONLY_MOD = $(LTONLY_$(BUILD_MOD))
 
 # platform-specific libtool flags
-NT_LTFLAGS_LIB = -no-undefined -avoid-version -rpath $(libdir)
-NT_LTFLAGS_MOD = -no-undefined -avoid-version -rpath $(moduledir)
+NT_LTFLAGS = -no-undefined -avoid-version -rpath $(libdir)
+NT_LTFLAGS_LIB = -no-undefined $(LTVERSION) -rpath $(libdir)
+NT_LTFLAGS_MOD = -no-undefined $(LTVERSION) -rpath $(libdir)
+UNIX_LTFLAGS = $(LTVERSION) -rpath $(libdir)
 UNIX_LTFLAGS_LIB = $(LTVERSION) -rpath $(libdir)
-UNIX_LTFLAGS_MOD = $(LTVERSION) -rpath $(moduledir)
+UNIX_LTFLAGS_MOD = $(LTVERSION) -rpath $(libdir)
 
 # libtool flags
 LTFLAGS     = $(@PLAT@_LTFLAGS)
index 9b3fdccbe264dfbc2f06bbadc51db7e5a9038d56..97972cdedf7ffb5edac075839ff3aa6b4867309c 100644 (file)
@@ -226,6 +226,24 @@ esac
 
 AC_SUBST(ldap_subdir)dnl
 
+dnl ----------------------------------------------------------------
+dnl --with-moduledir
+
+moduledir="openldap"
+
+AC_ARG_WITH(moduledir,
+[  --with-moduledir=DIR    change default module subdirectory used for installs],
+[case "$withval" in
+       no) moduledir=""
+               ;;
+       yes)
+               ;;
+       *)
+               moduledir="$withval"
+               ;;
+esac
+])dnl
+
 dnl ----------------------------------------------------------------
 dnl General "enable" options
 dnl set default to traditional to enable the original debug style
@@ -531,6 +549,21 @@ fi
 AC_MSG_RESULT(done)
 
 dnl ----------------------------------------------------------------
+
+dnl set moduledir- if moduledir starts with a /, then leave it alone.
+dnl otherwise, prepend libexecdir to it.
+case $moduledir in
+       /*|\\*)
+               ;;
+       *)
+               moduledir=$libexecdir/$moduledir
+               ;;
+esac
+
+AC_SUBST(moduledir)
+
+dnl ----------------------------------------------------------------
+
 dnl Initialize vars
 LDAP_LIBS=
 BDB_LIBS=