Commit 251c27cf authored by Bruno Coudoin's avatar Bruno Coudoin

Included the latest binreloc detection code from autopackage svn.

	Now binreloc detection works again, it follow the user choice
	and is on auto by default.

svn path=/trunk/; revision=2633
parent e19de99a
2007-05-07 Bruno coudoin <bruno.coudoin@free.fr>
Included the latest binreloc detection code from autopackage svn.
Now binreloc detection works again, it follow the user choice
and is on auto by default.
* acinclude.m4:
* configure.in:
2007-05-06 Bruno coudoin <bruno.coudoin@free.fr>
* configure.in: fixed a bad test around XLIBADD (by Manfred Tremmel)
......
......@@ -111,19 +111,16 @@ AC_DEFUN([AM_BINRELOC],
(default=enable when available)],
enable_binreloc=$enableval,enable_binreloc=auto)
AC_ARG_ENABLE(binreloc-threads,
[ --enable-binreloc-threads compile binary relocation with threads support
(default=yes)],
enable_binreloc_threads=$enableval,enable_binreloc_threads=yes)
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], [
# datarootdir variables was introduced with autoconf-2.60
if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
"$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
\( "$datadir" = '${prefix}/share' -o \( "$datadir" = '${datarootdir}' -a "$datarootdir" = '${prefix}/share' \) \) -a \
"$libdir" = '${exec_prefix}/lib' -a \
"$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
then
br_cv_valid_prefixes=yes
......@@ -150,33 +147,11 @@ AC_DEFUN([AM_BINRELOC],
if test "x$br_cv_binreloc" = "xyes"; then
BINRELOC_CFLAGS="-DENABLE_BINRELOC"
AC_DEFINE(ENABLE_BINRELOC,,[Use binary relocation?])
if test "x$enable_binreloc_threads" = "xyes"; then
AC_CHECK_LIB([pthread], [pthread_getspecific])
fi
AC_CACHE_CHECK([whether binary relocation should use threads],
[br_cv_binreloc_threads],
[if test "x$enable_binreloc_threads" = "xyes"; then
if test "x$ac_cv_lib_pthread_pthread_getspecific" = "xyes"; then
br_cv_binreloc_threads=yes
else
br_cv_binreloc_threads=no
fi
else
br_cv_binreloc_threads=no
fi])
if test "x$br_cv_binreloc_threads" = "xyes"; then
BINRELOC_LIBS="-lpthread"
AC_DEFINE(BR_PTHREAD,1,[Include pthread support for binary relocation?])
else
BINRELOC_CFLAGS="$BINRELOC_CFLAGS -DBR_PTHREADS=0"
AC_DEFINE(BR_PTHREAD,0,[Include pthread support for binary relocation?])
fi
fi
AC_SUBST(BINRELOC_CFLAGS)
AC_SUBST(BINRELOC_LIBS)
])
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
......@@ -188,7 +163,7 @@ dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
......@@ -249,7 +224,7 @@ char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
......@@ -257,7 +232,7 @@ my_strdup (char *str)
}
else
new_str = NULL;
return new_str;
}
......@@ -303,7 +278,7 @@ int main (int argc, char *argv[])
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
......
......@@ -120,7 +120,7 @@ AM_CONDITIONAL(WITH_NSBUNDLE, test "$nsbundle" = yes)
# Provide relocatable API from autopackage
# From http://autopackage.org/docs/binreloc/
enable_binreloc=yes
enable_binreloc=auto
if test x"$nsbundle" = "xyes" ; then
enable_binreloc=no
AC_MSG_NOTICE([binreloc disabled by nsbundle])
......@@ -639,7 +639,7 @@ echo "XF86VM option (--enable-xf86vidmode) = $found_xf86vidmode"
echo "SQLITE database (--enable-sqlite) = $with_sqlite (profiles depend on this)"
echo "GNET Networking (--enable-gnet) = $with_gnet (networking depends on this)"
echo "BINRELOC (--enable-binreloc) = $enable_binreloc"
echo "BINRELOC (--enable-binreloc) = $br_cv_binreloc"
echo "NSBundle (--enable-nsbundle) = $nsbundle"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment