File: acinclude.m4

package info (click to toggle)
chrpath 0.18-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 276 kB
  • sloc: sh: 3,169; ansic: 684; makefile: 43
file content (44 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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*|*-gnu*|*-k*bsd*-gnu)
		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)
])