You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by bo...@apache.org on 2009/02/10 18:37:11 UTC

svn commit: r743026 - /xerces/c/trunk/configure.ac

Author: borisk
Date: Tue Feb 10 17:37:09 2009
New Revision: 743026

URL: http://svn.apache.org/viewvc?rev=743026&view=rev
Log:
Add --disable-rpath configure option.

Modified:
    xerces/c/trunk/configure.ac

Modified: xerces/c/trunk/configure.ac
URL: http://svn.apache.org/viewvc/xerces/c/trunk/configure.ac?rev=743026&r1=743025&r2=743026&view=diff
==============================================================================
--- xerces/c/trunk/configure.ac (original)
+++ xerces/c/trunk/configure.ac Tue Feb 10 17:37:09 2009
@@ -45,6 +45,14 @@
 AM_INIT_AUTOMAKE([foreign subdir-objects dist-bzip2 tar-ustar])
 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.
 AC_PROG_CXX
 AC_PROG_CC
@@ -65,6 +73,15 @@
 AS_IF([test x$AR = xfalse],
 	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.
 # enable_shared and enable_static are defined by AC_PROG_LIBTOOL.
 #



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org