aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-12-05 17:14:24 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-12-05 17:14:24 +0000
commit55fd7471a6b46ad3b18b1c6c956d092f6a805de3 (patch)
treeed84f0ef158c36f97dddd92005255141dda7585a /configure.ac
parentSmall cleanups. (diff)
downloadsandbox-55fd7471a6b46ad3b18b1c6c956d092f6a805de3.tar.gz
sandbox-55fd7471a6b46ad3b18b1c6c956d092f6a805de3.tar.bz2
sandbox-55fd7471a6b46ad3b18b1c6c956d092f6a805de3.zip
Indentation fixes and other cleanups.
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac102
1 files changed, 49 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac
index ccb904d..7b6653e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,9 +29,9 @@ AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_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 \
+ 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 \
])
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -49,34 +49,34 @@ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([ \
- bzero ftruncate getcwd lchown memmove \
- memcpy memset mkdir pathconf realpath \
- rmdir setenv strcasecmp strchr strdup \
- strerror strndup strrchr strspn strstr \
+ bzero ftruncate getcwd lchown memmove \
+ memcpy memset mkdir pathconf realpath \
+ rmdir setenv strcasecmp strchr strdup \
+ strerror strndup strrchr strspn strstr \
])
dnl Some libc's like those on bsd have dlopen() in libc, and not libdl
AC_CHECK_LIB([dl], [dlopen],
- [have_libdl="yes"],
- [have_libdl="no"]
+ [have_libdl="yes"],
+ [have_libdl="no"]
)
if test x"$have_libdl" = xyes ; then
- LIBDL="-ldl"
- AC_SUBST([LIBDL])
- DL_LIB="dl"
+ LIBDL="-ldl"
+ AC_SUBST([LIBDL])
+ DL_LIB="dl"
else
- DL_LIB="c"
- AC_CHECK_LIB([c], [dlopen],
- [],
- [AC_MSG_ERROR([Unable to determine library providing dlopen])]
- )
+ DL_LIB="c"
+ AC_CHECK_LIB([c], [dlopen],
+ [],
+ [AC_MSG_ERROR([Unable to determine library providing dlopen])]
+ )
fi
dnl uClibc doesn't currently provide dlvsym() so lets
dnl verify the toolchain supports it
AC_CHECK_LIB([$DL_LIB], [dlvsym],
- [AC_DEFINE([HAVE_DLVSYM], [1], [libdl supports dlvsym])],
- [AC_DEFINE([HAVE_DLVSYM], [0], [libdl does not support dlvsym])]
+ [AC_DEFINE([HAVE_DLVSYM], [1], [libdl supports dlvsym])],
+ [AC_DEFINE([HAVE_DLVSYM], [0], [libdl does not support dlvsym])]
)
dnl when using libc5, (f)trucate's offset argument type is size_t with
@@ -84,31 +84,25 @@ dnl libc5, but it's off_t with libc6 (glibc2).
AC_MSG_CHECKING([truncate argument type])
TRUNC_ARG_TYPE=`echo '#include <unistd.h>' | $CC -E - | grep -q 'truncate.*size_t'`
if test "$TRUNC_ARG_TYPE"x != x ; then
- AC_MSG_RESULT([size_t])
- AC_DEFINE([TRUNCATE_T], [size_t], [truncate arg type])
+ AC_MSG_RESULT([size_t])
+ AC_DEFINE([TRUNCATE_T], [size_t], [truncate arg type])
else
- AC_MSG_RESULT([off_t])
- AC_DEFINE([TRUNCATE_T], [off_t], [truncate arg type])
+ AC_MSG_RESULT([off_t])
+ AC_DEFINE([TRUNCATE_T], [off_t], [truncate arg type])
fi
dnl Check if libc provides RTLD_NEXT
AC_MSG_CHECKING([for RTLD_NEXT])
AC_TRY_COMPILE([
-#define _GNU_SOURCE
-#include <dlfcn.h>
-], [
-#if !defined(RTLD_NEXT)
-# error no RTLD_NEXT
-#endif
-
-int
-main (void)
-{
- return 0;
-}
-],
- [have_rtld_next="yes"],
- [have_rtld_next="no"]
+ #define _GNU_SOURCE
+ #include <dlfcn.h>
+ ], [
+ #if !defined(RTLD_NEXT)
+ # error no RTLD_NEXT
+ #endif
+ ],
+ [have_rtld_next="yes"],
+ [have_rtld_next="no"]
)
AC_MSG_RESULT([$have_rtld_next])
AM_CONDITIONAL([HAVE_RTLD_NEXT], [test x"$have_rtld_next" = xyes])
@@ -117,12 +111,11 @@ dnl we need to handle symbols differently based upon their version,
dnl but we have to know which symbols the libc supports first
AC_MSG_CHECKING([libc path])
echo "int main(void) { return 0; }" > libctest.c
-$CC -Wall -o libctest libctest.c
LIBC_PATH=`$CC $CFLAGS -Wl,-verbose -o libctest libctest.c 2>&1 | \
- $AWK '/attempt to open/ { if (($4 ~ /\/libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}'`
-rm -f libctest.c
+ $AWK '/attempt to open/ { if (($4 ~ /\/libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}'`
+rm -f libctest*
if test "$LIBC_PATH"x = x || ! test -r "$LIBC_PATH"; then
- AC_MSG_ERROR([Unable to determine LIBC PATH])
+ AC_MSG_ERROR([Unable to determine LIBC PATH])
fi
AC_MSG_RESULT([$LIBC_PATH])
AC_SUBST([LIBC_PATH])
@@ -132,29 +125,32 @@ dnl libc to load and search with dl*() calls
AC_MSG_CHECKING([libc version])
dnl the sed script at the end here looks funny but it's ok ...
dnl they're m4 escape sequences for left and right brackets
+echo "int main(void) { return 0; }" > libctest.c
+$CC -Wall -o libctest libctest.c
LIBC_VERSION=`readelf -d libctest | grep NEEDED.*libc\\.so | $AWK '{print $NF}' | sed -e 's:\@<:@::' -e 's:\@:>@::'`
+rm -f libctest*
if test "$LIBC_VERSION"x = x ; then
- AC_MSG_ERROR([Unable to determine LIBC VERSION])
+ AC_MSG_ERROR([Unable to determine LIBC VERSION])
fi
-rm -f libctest
AC_MSG_RESULT([$LIBC_VERSION])
AC_DEFINE_UNQUOTED([LIBC_VERSION], ["$LIBC_VERSION"], [Name of libc to hook into])
dnl check if we have 32bit or 64bit output
AC_ARG_ENABLE([multilib],
- AS_HELP_STRING([--enable-multilib],
- [enable building for multilib setups (default=disabled)]),
- [enable_multilib="$enableval"],
- [enable_multilib="no"]
+ AS_HELP_STRING([--enable-multilib],
+ [enable building for multilib setups (default=disabled)]),
+ [enable_multilib="$enableval"],
+ [enable_multilib="no"]
)
if test x"$enable_multilib" != xno ; then
- AC_DEFINE([SB_HAVE_MULTILIB], [1], [Have multilib enabled system])
+ AC_DEFINE([SB_HAVE_MULTILIB], [1], [Have multilib enabled system])
fi
AC_OUTPUT([
- Makefile
- scripts/Makefile
- data/Makefile
- src/Makefile
+ Makefile
+ scripts/Makefile
+ data/Makefile
+ src/Makefile
])
+