Better version of patch.  Only kicks in when asked for
with --enable-rpath_sl

--- Tom Lane <[EMAIL PROTECTED]> wrote:

> "Lee Thompson" <[EMAIL PROTECTED]> writes:
> > +    if test "$enable_rpath" = yes ; then
> > +      LIBDIRS="$LIBDIRS -Wl,-R$dir"
> > +    fi
> 
> What is this supposed to accomplish?  (Other than
> probably breaking
> every non-gcc toolchain on the planet...)
> 
>                       regards, tom lane
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
diff -Nru postgresql-8.1.2.orig/configure postgresql-8.1.2/configure
--- postgresql-8.1.2.orig/configure	2006-02-15 10:00:03.000000000 -0600
+++ postgresql-8.1.2/configure	2006-02-15 11:44:10.000000000 -0600
@@ -314,7 +314,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_versi
 on python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_rpath_sl enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYT
 HON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -863,6 +863,7 @@
   --enable-nls[=LANGUAGES]  enable Native Language Support
   --disable-shared        do not build shared libraries
   --disable-rpath         do not embed shared library search path in executables
+  --enable-rpath_sl       embed shared library search path in dynamic shared libraries
   --disable-spinlocks     do not use spinlocks
   --enable-debug          build with debugging symbols (-g)
   --enable-depend         turn on automatic dependency tracking
@@ -1875,6 +1876,32 @@
 
 
 
+
+# Check whether --enable-rpath_sl or --disable-rpath_sl was given.
+if test "${enable_rpath_sl+set}" = set; then
+  enableval="$enable_rpath_sl"
+
+  case $enableval in
+    yes)
+      :
+      ;;
+    no)
+      :
+      ;;
+    *)
+      { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath_sl option" >&5
+echo "$as_me: error: no argument expected for --enable-rpath_sl option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+  esac
+
+else
+  enable_rpath_sl=no
+
+fi;
+
+
+
 #
 # Spinlocks
 #
@@ -3358,6 +3385,9 @@
 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
 for dir in $LIBRARY_DIRS $SRCH_LIB; do
   if test -d "$dir"; then
+    if test "$enable_rpath_sl" = yes; then
+      LIBDIRS="$LIBDIRS -Wl,-R$dir"
+    fi
     LIBDIRS="$LIBDIRS -L$dir"
   else
     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
@@ -3908,6 +3938,9 @@
 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
 
 
+if test "$enable_rpath_sl" = yes; then
+  LDFLAGS_SL="$LDFLAGS_SL $LIBDIRS"
+fi
 
 for ac_prog in gawk mawk nawk awk
 do
@@ -23209,6 +23242,7 @@
 s,@default_port@,$default_port,;t t
 s,@enable_shared@,$enable_shared,;t t
 s,@enable_rpath@,$enable_rpath,;t t
+s,@enable_rpath_sl@,$enable_rpath_sl,;t t
 s,@enable_debug@,$enable_debug,;t t
 s,@CC@,$CC,;t t
 s,@CFLAGS@,$CFLAGS,;t t
diff -Nru postgresql-8.1.2.orig/configure.in postgresql-8.1.2/configure.in
--- postgresql-8.1.2.orig/configure.in	2006-02-15 10:00:03.000000000 -0600
+++ postgresql-8.1.2/configure.in	2006-02-15 11:43:57.000000000 -0600
@@ -193,6 +193,9 @@
 PGAC_ARG_BOOL(enable, rpath, yes,
               [  --disable-rpath         do not embed shared library search path in executables])
 AC_SUBST(enable_rpath)
+PGAC_ARG_BOOL(enable, rpath_sl, no,
+              [  --enable-rpath_sl       embed shared library search path in dynamic shared libraries])
+AC_SUBST(enable_rpath_sl)
 
 #
 # Spinlocks
@@ -357,6 +360,9 @@
 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
 for dir in $LIBRARY_DIRS $SRCH_LIB; do
   if test -d "$dir"; then
+    if test "$enable_rpath_sl" = yes; then
+      LIBDIRS="$LIBDIRS -Wl,-R$dir"
+    fi
     LIBDIRS="$LIBDIRS -L$dir"
   else
     AC_MSG_WARN([*** Library directory $dir does not exist.])
@@ -525,6 +531,9 @@
 AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])
 
 AC_ARG_VAR(LDFLAGS_SL)
+if test "$enable_rpath_sl" = yes; then
+  LDFLAGS_SL="$LDFLAGS_SL $LIBDIRS"
+fi
 
 AC_PROG_AWK
 PGAC_PATH_FLEX
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to