Mercurial > hg > chrpath
diff acinclude.m4 @ 0:b8f7423e385c
import 0.13
author | Peter Meerwald <pmeerw@pmeerw.net> |
---|---|
date | Fri, 20 Jul 2012 01:51:24 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/acinclude.m4 Fri Jul 20 01:51:24 2012 +0200 @@ -0,0 +1,44 @@ +dnl +dnl Add macros +dnl JAPHAR_GREP_CFLAGS +dnl + +dnl +dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present) +dnl +dnl From Japhar. Report changes to japhar@hungry.com +dnl +AC_DEFUN(JAPHAR_GREP_CFLAGS, +[case "$CFLAGS" in +"$1" | "$1 "* | *" $1" | *" $1 "* ) + ifelse($#, 3, [$3], [:]) + ;; +*) + $2 + ;; +esac +]) + +AC_DEFUN(CHRPATH_LDRPATH_OPTION, +[AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl +case "$target" in + *-linux*) + LDRPATH=-Wl,-rpath, + ;; + *-*-irix*|*-*-osf*) + LDRPATH="-rpath " + ;; + *-*-hpux*) + # Hm, this seem to set runpath on ia64, not rpath + LDRPATH="-Wl,+b," + ;; + *-*-darwin*) + # No idea how to add rpath/runpath on Darwin + LDRPATH="" + ;; + *) + LDRPATH="-R " + ;; +esac +AC_SUBST(LDRPATH) +])