Skip to content
Snippets Groups Projects
Commit 07fd30b8 authored by Boris Kolpackov's avatar Boris Kolpackov
Browse files

Add --disable-rpath configure option.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@743026 13f79535-47bb-0310-9956-ffa450edef68
parent bffc18ff
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,14 @@ AC_CANONICAL_HOST ...@@ -45,6 +45,14 @@ AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 tar-ustar]) AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 tar-ustar])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
# Check if rpath is disabled
AC_MSG_CHECKING(whether to use rpath)
AC_ARG_ENABLE(rpath,
[AC_HELP_STRING([--disable-rpath],
[Patches libtool to not use rpath in the libraries produced.])],
[xerces_cv_rpath="$enable_rpath"], [xerces_cv_rpath="yes"])
AC_MSG_RESULT($xerces_cv_rpath)
# Checks for programs. # Checks for programs.
AC_PROG_CXX AC_PROG_CXX
AC_PROG_CC AC_PROG_CC
...@@ -65,6 +73,15 @@ AM_PROG_CC_C_O ...@@ -65,6 +73,15 @@ AM_PROG_CC_C_O
AS_IF([test x$AR = xfalse], AS_IF([test x$AR = xfalse],
AC_MSG_ERROR([Cannot find a valid 'ar' tool])) AC_MSG_ERROR([Cannot find a valid 'ar' tool]))
# Patch libtool to not use rpath if requested.
if test "$xerces_cv_rpath" = "no"; then
AC_MSG_RESULT([Patching libtool to not use rpath.])
sed < libtool > libtool-2 \
's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_NO_RPATH__ "/'
mv libtool-2 libtool
chmod 755 libtool
fi
# Export information on whether we are building static/shared libraries. # Export information on whether we are building static/shared libraries.
# enable_shared and enable_static are defined by AC_PROG_LIBTOOL. # enable_shared and enable_static are defined by AC_PROG_LIBTOOL.
# #
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment