diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-10-05 07:47:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:20:34 -0500 |
commit | df31092a0171b1fee62138608294c2af3e4d0074 (patch) | |
tree | a45bfa1584d12ade291fff61309fd084dc04756f | |
parent | a484b8367b21728de7c6dcd744d43edf0d7d1ede (diff) | |
download | samba-df31092a0171b1fee62138608294c2af3e4d0074.tar.gz samba-df31092a0171b1fee62138608294c2af3e4d0074.tar.bz2 samba-df31092a0171b1fee62138608294c2af3e4d0074.zip |
r19091: merge from samba3:
remove some -Wl,-rpath combinations with /usr/lib
metze
(This used to be commit 66c6aab37ea24ae3f867b34f3b8039921fa2f718)
-rw-r--r-- | source4/aclocal.m4 | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/source4/aclocal.m4 b/source4/aclocal.m4 index df29bf1995..57a66439a1 100644 --- a/source4/aclocal.m4 +++ b/source4/aclocal.m4 @@ -22,13 +22,32 @@ AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[ $1=[$]ac_new_flags ]) -dnl Removes -L/usr/lib/? from given variable +dnl Removes '-L/usr/lib[/]', '-Wl,-rpath,/usr/lib[/]' +dnl and '-Wl,-rpath -Wl,/usr/lib[/]' from given variable AC_DEFUN(LIB_REMOVE_USR_LIB,[ ac_new_flags="" + l="" for i in [$]$1; do - case [$]i in - -L/usr/lib|-L/usr/lib/) ;; - *) ac_new_flags="[$]ac_new_flags [$]i" ;; + case [$]l[$]i in + -L/usr/lib) ;; + -L/usr/lib/) ;; + -Wl,-rpath,/usr/lib) ;; + -Wl,-rpath,/usr/lib/) ;; + -Wl,-rpath) l=[$]i;; + -Wl,-rpath-Wl,/usr/lib) l="";; + -Wl,-rpath-Wl,/usr/lib/) l="";; + *) + s=" " + if test x"[$]ac_new_flags" = x""; then + s=""; + fi + if test x"[$]l" = x""; then + ac_new_flags="[$]ac_new_flags[$]s[$]i"; + else + ac_new_flags="[$]ac_new_flags[$]s[$]l [$]i"; + fi + l="" + ;; esac done $1=[$]ac_new_flags |