File: acinclude.m4

package info (click to toggle)
adanaxisgpl 1.2.5.dfsg.1-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, sid, stretch
  • size: 39,988 kB
  • sloc: ansic: 69,023; cpp: 65,175; ruby: 14,217; xml: 8,416; sh: 7,434; perl: 2,233; objc: 256; makefile: 154; yacc: 92
file content (49 lines) | stat: -rw-r--r-- 1,579 bytes parent folder | download | duplicates (6)
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
45
46
47
48
49
# Check for binary relocation support.
# Written by Hongli Lai
# http://autopackage.org/
# Prefix test, threading and CFLAGS tweaked by Andy Southgate 2007-06-25

AC_DEFUN([AM_BINRELOC],
[
	AC_ARG_ENABLE(binreloc,
		[  --enable-binreloc       compile with binary relocation support
                          (default=enable when available)],
		enable_binreloc=$enableval,enable_binreloc=auto)

	BINRELOC_CFLAGS=
	BINRELOC_LIBS=
	if test "x$enable_binreloc" = "xauto"; then
		AC_CHECK_FILE([/proc/self/maps])
		AC_CACHE_CHECK([whether everything is installed to the same prefix],
			       [br_cv_valid_prefixes], [
                                if test "$bindir" = '${exec_prefix}/bin' -a \
                                    \( "$datadir" = '${prefix}/share' -o "$datadir" = '${datarootdir}' \)
				then
					br_cv_valid_prefixes=yes
				else
					br_cv_valid_prefixes=no
				fi
				])
	fi
	AC_CACHE_CHECK([whether binary relocation support should be enabled],
		       [br_cv_binreloc],
		       [if test "x$enable_binreloc" = "xyes"; then
		       	       br_cv_binreloc=yes
		       elif test "x$enable_binreloc" = "xauto"; then
			       if test "x$br_cv_valid_prefixes" = "xyes" -a \
			       	       "x$ac_cv_file__proc_self_maps" = "xyes"; then
				       br_cv_binreloc=yes
			       else
				       br_cv_binreloc=no
			       fi
		       else
			       br_cv_binreloc=no
		       fi])

	if test "x$br_cv_binreloc" = "xyes"; then
		BINRELOC_CFLAGS=""
		AC_DEFINE(ENABLE_BINRELOC,,[Use binary relocation?])
	fi
	AC_SUBST(BINRELOC_CFLAGS)
	AC_SUBST(BINRELOC_LIBS)
])