# Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed.
#
-# Version 7
+# Version 8
+# 2010-03-01 Fix RPATH using CONFIG_COMMANDS to run at the very end.
# 2010-02-18 WITH_SSL outputs the LIBSSL_LDFLAGS, LIBS, CPPFLAGS seperate, -ldl
# 2010-02-01 added ACX_CHECK_MEMCMP_SIGNED, AHX_MEMCMP_BROKEN
# 2010-01-20 added AHX_COONFIG_STRLCAT
[ --disable-rpath disable hardcoded rpath (default=enabled)],
enable_rpath=$enableval, enable_rpath=yes)
if test "x$enable_rpath" = xno; then
- AC_MSG_RESULT([Fixing libtool for -rpath problems.])
+ dnl AC_MSG_RESULT([Fixing libtool for -rpath problems.])
+ AC_CONFIG_COMMANDS([disable-rpath], [
sed < libtool > libtool-2 \
's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
mv libtool-2 libtool
chmod 755 libtool
libtool="./libtool"
+ ])
fi
])
fi
if test "x$enable_rpath" = xno; then
- { $as_echo "$as_me:$LINENO: result: Fixing libtool for -rpath problems." >&5
-$as_echo "Fixing libtool for -rpath problems." >&6; }
- sed < libtool > libtool-2 \
- 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
- mv libtool-2 libtool
- chmod 755 libtool
- libtool="./libtool"
+ ac_config_commands="$ac_config_commands disable-rpath"
+
fi
do
case $ac_config_target in
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "disable-rpath") CONFIG_COMMANDS="$CONFIG_COMMANDS disable-rpath" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"doc/example.conf") CONFIG_FILES="$CONFIG_FILES doc/example.conf" ;;
"doc/libunbound.3") CONFIG_FILES="$CONFIG_FILES doc/libunbound.3" ;;
chmod +x "$ofile"
;;
+ "disable-rpath":C)
+ sed < libtool > libtool-2 \
+ 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_RPATH_SED__ "/'
+ mv libtool-2 libtool
+ chmod 755 libtool
+ libtool="./libtool"
+ ;;
esac
done # for ac_tag