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

Diff of /trunk/configure.ac

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

Revision 327 Revision 356
27AC_FUNC_ALLOCA 27AC_FUNC_ALLOCA
28AC_HEADER_DIRENT 28AC_HEADER_DIRENT
29AC_HEADER_STDC 29AC_HEADER_STDC
30AC_HEADER_SYS_WAIT 30AC_HEADER_SYS_WAIT
31AC_CHECK_HEADERS([ \ 31AC_CHECK_HEADERS([ \
32 fcntl.h limits.h memory.h stddef.h \ 32 fcntl.h limits.h memory.h stddef.h \
33 stdlib.h string.h strings.h sys/file.h \ 33 stdlib.h string.h strings.h sys/file.h \
34 sys/param.h sys/time.h unistd.h utime.h \ 34 sys/param.h sys/time.h unistd.h utime.h \
35]) 35])
36 36
37dnl Checks for typedefs, structures, and compiler characteristics. 37dnl Checks for typedefs, structures, and compiler characteristics.
38AC_C_CONST 38AC_C_CONST
39AC_TYPE_UID_T 39AC_TYPE_UID_T
47AC_FUNC_LSTAT 47AC_FUNC_LSTAT
48AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK 48AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
49AC_TYPE_SIGNAL 49AC_TYPE_SIGNAL
50AC_FUNC_STAT 50AC_FUNC_STAT
51AC_CHECK_FUNCS([ \ 51AC_CHECK_FUNCS([ \
52 bzero ftruncate getcwd lchown memmove \ 52 bzero ftruncate getcwd lchown memmove \
53 memcpy memset mkdir pathconf realpath \ 53 memcpy memset mkdir pathconf realpath \
54 rmdir setenv strcasecmp strchr strdup \ 54 rmdir setenv strcasecmp strchr strdup \
55 strerror strndup strrchr strspn strstr \ 55 strerror strndup strrchr strspn strstr \
56 strtok_r \ 56 strtok_r \
57]) 57])
58dnl For librcutil 58dnl For librcutil
59AC_CHECK_FUNCS([remove]) 59AC_CHECK_FUNCS([remove])
60 60
61dnl Check if gcc provides va_copy or __va_copy (for librcutil) 61dnl Check if gcc provides va_copy or __va_copy (for librcutil)
154 154
155dnl we need to handle symbols differently based upon their version, 155dnl we need to handle symbols differently based upon their version,
156dnl but we have to know which symbols the libc supports first 156dnl but we have to know which symbols the libc supports first
157AC_MSG_CHECKING([libc path]) 157AC_MSG_CHECKING([libc path])
158echo "int main(void) { return 0; }" > libctest.c 158echo "int main(void) { return 0; }" > libctest.c
159$CC $CFLAGS -Wl,-verbose -o libctest libctest.c &> libctest.log 159$CC $CFLAGS $CPPFLAGS $LDFLAGS -Wl,-verbose -o libctest libctest.c > libctest.log 2>&1
160cat libctest.log 1>&AS_MESSAGE_LOG_FD 160cat libctest.log 1>&AS_MESSAGE_LOG_FD
161LIBC_PATH=$(
161LIBC_PATH=`$AWK '/attempt to open/ { if (($4 ~ /\/libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}' libctest.log` 162 $AWK '/attempt to open/ { if (($4 ~ /\/libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}' libctest.log
163)
162rm -f libctest* 164rm -f libctest*
163if test x"$LIBC_PATH" = x || ! test -r "$LIBC_PATH" ; then 165if test x"$LIBC_PATH" = x || ! test -r "$LIBC_PATH" ; then
164 AC_MSG_ERROR([Unable to determine LIBC PATH ($LIBC_PATH)]) 166 AC_MSG_ERROR([Unable to determine LIBC PATH ($LIBC_PATH)])
165fi 167fi
166AC_MSG_RESULT([$LIBC_PATH]) 168AC_MSG_RESULT([$LIBC_PATH])
168 170
169dnl when intercepting libc calls, we have to know the name of the 171dnl when intercepting libc calls, we have to know the name of the
170dnl libc to load and search with dl*() calls 172dnl libc to load and search with dl*() calls
171AC_MSG_CHECKING([libc version]) 173AC_MSG_CHECKING([libc version])
172dnl the sed script at the end here looks funny but it's ok ... 174dnl the sed script at the end here looks funny but it's ok ...
173dnl they're m4 escape sequences for left and right brackets
174echo "int main(void) { return 0; }" > libctest.c 175echo "int main(void) { return 0; }" > libctest.c
175$CC -Wall -o libctest libctest.c 176$CC $CFLAGS $CPPFLAGS $LDFLAGS -Wall -o libctest libctest.c
176LIBC_VERSION=`$READELF -d libctest | grep NEEDED.*libc\\.so | $AWK '{print $NF}' | sed -e 's:\@<:@::' -e 's:\@:>@::'` 177LIBC_VERSION=$(
178 $READELF -d libctest | \
179 grep NEEDED.*libc\\.so | \
180 $AWK '{print $NF}' | sed -e ['s:\[::' -e 's:\]::']
181)
177rm -f libctest* 182rm -f libctest*
178if test "$LIBC_VERSION"x = x ; then 183if test "$LIBC_VERSION"x = x ; then
179 AC_MSG_ERROR([Unable to determine LIBC VERSION]) 184 AC_MSG_ERROR([Unable to determine LIBC VERSION])
180fi 185fi
181AC_MSG_RESULT([$LIBC_VERSION]) 186AC_MSG_RESULT([$LIBC_VERSION])
182AC_DEFINE_UNQUOTED([LIBC_VERSION], ["$LIBC_VERSION"], [Name of libc to hook into]) 187AC_DEFINE_UNQUOTED([LIBC_VERSION], ["$LIBC_VERSION"], [Name of libc to hook into])
183 188
184dnl check if we have 32bit or 64bit output 189dnl We add to CPPFLAGS rather than doing AC_DEFINE_UNQUOTED
185AC_ARG_ENABLE([multilib], 190dnl so we dont have to worry about fully expanding all of
186 AS_HELP_STRING([--enable-multilib], 191dnl the variables ($sysconfdir defaults to "$prefix/etc")
187 [enable building for multilib setups (default=disabled)]),
188 [enable_multilib="$enableval"],
189 [enable_multilib="no"]
190)
191
192if test x"$enable_multilib" != xno ; then
193 AC_DEFINE([SB_HAVE_MULTILIB], [1], [Have multilib enabled system])
194fi
195
196SANDBOX_DEFINES='-DETCDIR="\"$(sysconfdir)\"" -DLIBSANDBOX_PATH="\"$(libdir)\"" -DSANDBOX_BASHRC_PATH="\"$(pkgdatadir)\""' 192SANDBOX_DEFINES='-DETCDIR="\"$(sysconfdir)\"" -DLIBSANDBOX_PATH="\"$(libdir)\"" -DSANDBOX_BASHRC_PATH="\"$(pkgdatadir)\""'
197AC_SUBST([SANDBOX_DEFINES]) 193AC_SUBST([SANDBOX_DEFINES])
198 194
199AC_OUTPUT([ 195AC_OUTPUT([
200 Makefile 196 Makefile
201 scripts/Makefile 197 scripts/Makefile
202 etc/Makefile 198 etc/Makefile
203 data/Makefile 199 data/Makefile
204 libsbutil/Makefile 200 libsbutil/Makefile
205 libsandbox/Makefile 201 libsandbox/Makefile
206 src/Makefile 202 src/Makefile
207]) 203])

Legend:
Removed from v.327  
changed lines
  Added in v.356

  ViewVC Help
Powered by ViewVC 1.1.20