/[path-sandbox]/trunk/configure.in
Gentoo

Diff of /trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 16 Revision 53
1AC_PREREQ(2.59) 1AC_PREREQ(2.59)
2AC_INIT(sandbox, 1.1, dev-portage@gentoo.org) 2AC_INIT(sandbox, 1.2.2, dev-portage@gentoo.org)
3AM_INIT_AUTOMAKE 3AM_INIT_AUTOMAKE
4AC_CONFIG_SRCDIR([canonicalize.c])
5AC_CONFIG_HEADER([config.h]) 4AC_CONFIG_HEADER([config.h])
6 5
7# Checks for programs. 6# Checks for programs.
8AC_PROG_CC 7AC_PROG_CC
8AC_ISC_POSIX
9AC_PROG_INSTALL
10AC_PROG_MAKE_SET
11AC_PROG_AWK
12
13AC_ENABLE_SHARED
14AC_DISABLE_STATIC
9AC_PROG_LIBTOOL 15AC_PROG_LIBTOOL
10 16
11AC_PREFIX_DEFAULT([/usr]) 17AC_PREFIX_DEFAULT([/usr])
18
12# Checks for libraries. 19# Checks for libraries.
13# Checks for header files. 20# Checks for header files.
14AC_FUNC_ALLOCA 21AC_FUNC_ALLOCA
15AC_HEADER_DIRENT 22AC_HEADER_DIRENT
16AC_HEADER_STDC 23AC_HEADER_STDC
17AC_HEADER_SYS_WAIT 24AC_HEADER_SYS_WAIT
18AC_CHECK_HEADERS([fcntl.h limits.h memory.h stddef.h stdlib.h string.h strings.h sys/file.h sys/param.h sys/time.h unistd.h utime.h]) 25AC_CHECK_HEADERS([ \
26fcntl.h limits.h memory.h stddef.h \
27stdlib.h string.h strings.h sys/file.h \
28sys/param.h sys/time.h unistd.h utime.h \
29])
19 30
20# Checks for typedefs, structures, and compiler characteristics. 31# Checks for typedefs, structures, and compiler characteristics.
21AC_C_CONST 32AC_C_CONST
22AC_TYPE_UID_T 33AC_TYPE_UID_T
23AC_TYPE_MODE_T 34AC_TYPE_MODE_T
31AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK 42AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
32AC_FUNC_MALLOC 43AC_FUNC_MALLOC
33AC_FUNC_REALLOC 44AC_FUNC_REALLOC
34AC_TYPE_SIGNAL 45AC_TYPE_SIGNAL
35AC_FUNC_STAT 46AC_FUNC_STAT
36AC_CHECK_FUNCS([bzero ftruncate getcwd lchown memmove mempcpy memset mkdir pathconf realpath rmdir setenv strcasecmp strchr strdup strerror strndup strrchr strspn strstr]) 47AC_CHECK_FUNCS([ \
48bzero ftruncate getcwd lchown memmove \
49mempcpy memset mkdir pathconf realpath \
50rmdir setenv strcasecmp strchr strdup \
51strerror strndup strrchr strspn strstr \
52])
37 53
38AC_CONFIG_FILES([Makefile]) 54dnl when using libc5, (f)trucate's offset argument type is size_t with
39AC_OUTPUT 55dnl libc5, but it's off_t with libc6 (glibc2).
56AC_MSG_CHECKING(truncate argument type)
57if echo '#include <unistd.h>' | $CC -E - | grep -q 'truncate.*size_t' ; then
58 AC_MSG_RESULT(size_t)
59 AC_DEFINE(TRUNCATE_T, size_t, [truncate arg type])
60else
61 AC_MSG_RESULT(off_t)
62 AC_DEFINE(TRUNCATE_T, off_t, [truncate arg type])
63fi
64
65dnl we need to handle symbols differently based upon their version,
66dnl but we have to know which symbols the libc supports first
67AC_MSG_CHECKING(libc path)
68echo "int main(void) { return 0; }" > libctest.c
69$CC -Wall -o libctest libctest.c
70LIBC_PATH=`$CC $CFLAGS -Wl,-verbose -o libctest libctest.c 2>&1 | \
71 gawk '/attempt to open/ { if (($4 ~ /libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}'`
72if test "$LIBC_PATH"x = x ; then
73 AC_MSG_ERROR(Unable to determine LIBC PATH)
74fi
75AC_MSG_RESULT($LIBC_PATH)
76AC_SUBST(LIBC_PATH)
77
78dnl when intercepting libc calls, we have to know the name of the
79dnl libc to load and search with dl*() calls
80AC_MSG_CHECKING(libc version)
81dnl the sed script at the end here looks funny but it's ok ...
82dnl they're m4 escape sequences for left and right brackets
83LIBC_VERSION=`readelf -d libctest | grep NEEDED.*libc\\.so | $AWK '{print $NF}' | sed -e 's:\@<:@::' -e 's:\@:>@::'`
84if test "$LIBC_VERSION"x = x ; then
85 AC_MSG_ERROR(Unable to determine LIBC VERSION)
86fi
87AC_MSG_RESULT($LIBC_VERSION)
88AC_DEFINE_UNQUOTED(LIBC_VERSION, "$LIBC_VERSION", [name of libc to hook into])
89rm -f libctest
90
91AC_OUTPUT([Makefile])

Legend:
Removed from v.16  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.20