From 251c27cffa461f45a835df6468771b80d75d4b17 Mon Sep 17 00:00:00 2001 From: Bruno Coudoin Date: Mon, 07 May 2007 13:35:27 +0000 Subject: 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 --- (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 53eb8ea..234ce1d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 -- cgit v0.9.1