Loading BUILD/SETUP.sh.rejdeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line *************** *** 39,46 **** c_warnings="$global_warnings -Wunused" cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" ! alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet ! pentium_cflags="-mcpu=pentiumpro" sparc_cflags="" # be as fast as we can be without losing our ability to backtrace --- 39,46 ---- c_warnings="$global_warnings -Wunused" cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" ! #alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet ! #pentium_cflags="-mcpu=pentiumpro" sparc_cflags="" # be as fast as we can be without losing our ability to backtrace config/ac-macros/misc.m4 +24 −0 Original line number Diff line number Diff line Loading @@ -790,3 +790,27 @@ esac AC_SUBST(AR) AC_SUBST(ARFLAGS) ]) dnl dnl Macro to check time_t range: according to C standard dnl array index must be greater than 0 => if time_t is signed, dnl the code in the macros below won't compile. dnl AC_DEFUN([MYSQL_CHECK_TIME_T],[ AC_MSG_CHECKING(if time_t is unsigned) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[ #include <time.h> ]], [[ int array[(((time_t)-1) > 0) ? 1 : -1]; ]] ) ], [ AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned]) AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no)] ) ]) config/ac-macros/zlib.m4 +12 −3 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ dnl Define zlib paths to point at bundled zlib AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [ ZLIB_INCLUDES="-I\$(top_srcdir)/zlib" ZLIB_LIBS="\$(top_builddir)/zlib/libz.la" ZLIB_LIBS="\$(top_builddir)/zlib/libzlt.la" dnl Omit -L$pkglibdir as it's always in the list of mysql_config deps. ZLIB_DEPS="-lz" zlib_dir="zlib" Loading @@ -10,16 +10,25 @@ AC_SUBST([zlib_dir]) mysql_cv_compress="yes" ]) dnl Auxiliary macro to check for zlib at given path dnl Auxiliary macro to check for zlib at given path. dnl We are strict with the server, as "archive" engine dnl needs zlibCompileFlags(), but for client only we dnl are less strict, and take the zlib we find. AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [ save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS" LIBS="$LIBS $ZLIB_LIBS" if test X"$with_server" = Xno then zlibsym=zlibVersion else zlibsym=zlibCompileFlags fi AC_CACHE_VAL([mysql_cv_compress], [AC_TRY_LINK([#include <zlib.h>], [return zlibCompileFlags();], [return $zlibsym();], [mysql_cv_compress="yes" AC_MSG_RESULT([ok])], [mysql_cv_compress="no"]) Loading configure.in +3 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ NDB_VERSION_STATUS="" # Remember that regexps needs to quote [ and ] since this is run through m4 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"` MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'` MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION | sed -e 's|[[^0-9.]].*$||;s|$|.|' | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'` # The port should be constant for a LONG time MYSQL_TCP_PORT_DEFAULT=3306 Loading Loading @@ -1601,9 +1601,9 @@ fi # dlopen, dlerror case "$with_mysqld_ldflags " in *"-static "*) *"-all-static "*) # No need to check for dlopen when mysqld is linked with # -all-static or -static as it won't be able to load any functions. # -all-static as it won't be able to load any functions. # NOTE! It would be better if it was possible to test if dlopen # can be used, but a good way to test it couldn't be found Loading configure.in.rejdeleted 100644 → 0 +0 −299 Original line number Diff line number Diff line *************** *** 388,402 **** if expr "$target_os" : "[[Ll]]inux.*" > /dev/null then MYSQLD_DEFAULT_SWITCHES="--skip-locking" ! IS_LINUX="true" AC_MSG_RESULT("yes"); else MYSQLD_DEFAULT_SWITCHES="" ! IS_LINUX="false" AC_MSG_RESULT("no"); fi AC_SUBST(MYSQLD_DEFAULT_SWITCHES) ! AC_SUBST(IS_LINUX) dnl Find paths to some shell programs AC_PATH_PROG(LN, ln, ln) --- 388,403 ---- if expr "$target_os" : "[[Ll]]inux.*" > /dev/null then MYSQLD_DEFAULT_SWITCHES="--skip-locking" ! TARGET_LINUX="true" AC_MSG_RESULT("yes"); + AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) else MYSQLD_DEFAULT_SWITCHES="" ! TARGET_LINUX="false" AC_MSG_RESULT("no"); fi AC_SUBST(MYSQLD_DEFAULT_SWITCHES) ! AC_SUBST(TARGET_LINUX) dnl Find paths to some shell programs AC_PATH_PROG(LN, ln, ln) *************** *** 576,582 **** # (this is true on the MySQL build machines to avoid NSS problems) # ! if test "$IS_LINUX" = "true" -a "$static_nss" = "" then tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r` if test -n "$tmp" --- 577,583 ---- # (this is true on the MySQL build machines to avoid NSS problems) # ! if test "$TARGET_LINUX" = "true" -a "$static_nss" = "" then tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r` if test -n "$tmp" *************** *** 827,833 **** ]) AC_SUBST(WRAPLIBS) ! if test "$IS_LINUX" = "true"; then AC_MSG_CHECKING([for atomic operations]) AC_LANG_SAVE --- 828,834 ---- ]) AC_SUBST(WRAPLIBS) ! if test "$TARGET_LINUX" = "true"; then AC_MSG_CHECKING([for atomic operations]) AC_LANG_SAVE *************** *** 870,876 **** [ USE_PSTACK=no ]) pstack_libs= pstack_dirs= ! if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no" then have_libiberty= have_libbfd= my_save_LIBS="$LIBS" --- 871,877 ---- [ USE_PSTACK=no ]) pstack_libs= pstack_dirs= ! if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no" then have_libiberty= have_libbfd= my_save_LIBS="$LIBS" *************** *** 1239,1301 **** # Hack for DEC-UNIX (OSF1) if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" then ! # Look for LinuxThreads. ! AC_MSG_CHECKING("LinuxThreads") ! grepres=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` ! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep LINUXTHREADS | wc -l || echo 0` ! if test "$grepres" -gt 0 -o "$getconfres" -gt 0 then ! AC_MSG_RESULT("Found") ! AC_DEFINE(HAVE_LINUXTHREADS) ! # Linux 2.0 sanity check ! AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], , ! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual])) ! # RedHat 5.0 does not work with dynamic linking of this. -static also ! # gives a speed increase in linux so it does not hurt on other systems. ! with_named_thread="-lpthread" ! else ! AC_MSG_RESULT("Not found") ! # If this is a linux machine we should barf ! AC_MSG_CHECKING("NPTL") ! if test "$IS_LINUX" = "true" ! then ! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep NPTL | wc -l || echo 0` ! if test "$getconfres" -gt 0 then ! AC_DEFINE(HAVE_LINUXTHREADS) dnl All this code predates NPTL, so "have linuxthreads" is a poor name. ! with_named_thread="-lpthread" else ! AC_MSG_ERROR([This is a Linux system and neither Linuxthreads nor NPTL were ! found. Please install Linuxthreads or a new glibc and try ! again. See the Installation chapter in the Reference Manual for ! more information.]) fi ! else ! AC_MSG_CHECKING("DEC threads") ! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthread -lmach -lexc" ! CFLAGS="$CFLAGS -D_REENTRANT" ! CXXFLAGS="$CXXFLAGS -D_REENTRANT" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! AC_MSG_CHECKING("DEC 3.2 threads") ! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthreads -lmach -lc_r" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_DEFINE(HAVE_DEC_3_2_THREADS) ! with_osf32_threads="yes" ! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority" ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! fi ! fi ! fi ! fi fi --- 1240,1337 ---- # Hack for DEC-UNIX (OSF1) if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" then ! AC_MSG_CHECKING("Linux threads") ! if test "$TARGET_LINUX" = "true" then ! AC_MSG_RESULT("starting") ! # use getconf to check glibc contents ! AC_MSG_CHECKING("getconf GNU_LIBPTHREAD_VERSION") ! case `getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` in ! NPTL* ) ! AC_MSG_RESULT("NPTL") ! AC_DEFINE([HAVE_NPTL], [1], [NPTL threads implementation]) ! with_named_thread="-lpthread" ! ;; ! LINUXTHREADS* ) ! AC_MSG_RESULT("Linuxthreads") ! AC_DEFINE([HAVE_LINUXTHREADS], [1], ! [Whether we are using Xavier Leroy's LinuxThreads]) ! with_named_thread="-lpthread" ! ;; ! * ) ! AC_MSG_RESULT("unknown") ! ;; ! esac ! if test "$with_named_thread" = "no" then ! # old method, check headers ! # Look for LinuxThreads. ! AC_MSG_CHECKING("LinuxThreads in header file comment") ! res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` ! if test "$res" -gt 0 ! then ! AC_MSG_RESULT("Found") ! AC_DEFINE([HAVE_LINUXTHREADS], [1], ! [Whether we are using Xavier Leroy's LinuxThreads]) ! # Linux 2.0 sanity check ! AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], , ! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual])) ! # RedHat 5.0 does not work with dynamic linking of this. -static also ! # gives a speed increase in linux so it does not hurt on other systems. ! with_named_thread="-lpthread" ! else ! AC_MSG_RESULT("Not found") ! # If this is a linux machine we should barf ! AC_MSG_ERROR([This is a Linux system without a working getconf, ! and Linuxthreads was not found. Please install it (or a new glibc) and try again. ! See the Installation chapter in the Reference Manual for more information.]) ! fi else ! AC_MSG_RESULT("no need to check headers") fi ! AC_MSG_CHECKING("for pthread_create in -lpthread"); ! ac_save_LIBS="$LIBS" ! LIBS="$LIBS -lpthread" ! AC_TRY_LINK( [#include <pthread.h>], ! [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], ! AC_MSG_RESULT("yes"), ! [ AC_MSG_RESULT("no") ! AC_MSG_ERROR([ ! This is a Linux system claiming to support threads, either Linuxthreads or NPTL, but linking a test program failed. ! Please install one of these (or a new glibc) and try again. ! See the Installation chapter in the Reference Manual for more information.]) ] ! ) ! LIBS="$ac_save_LIBS" ! else ! AC_MSG_RESULT("no") ! fi # "$TARGET_LINUX" ! fi # "$with_named_thread" = "no" -a "$with_mit_threads" = "no" ! ! if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" ! then ! AC_MSG_CHECKING("DEC threads") ! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthread -lmach -lexc" ! CFLAGS="$CFLAGS -D_REENTRANT" ! CXXFLAGS="$CXXFLAGS -D_REENTRANT" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! AC_MSG_CHECKING("DEC 3.2 threads") ! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthreads -lmach -lc_r" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_DEFINE(HAVE_DEC_3_2_THREADS) ! with_osf32_threads="yes" ! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority" ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! fi ! fi fi *************** *** 1720,1726 **** AC_SUBST(COMPILATION_COMMENT) AC_MSG_CHECKING("need of special linking flags") ! if test "$IS_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes" then LDFLAGS="$LDFLAGS -rdynamic" AC_MSG_RESULT("-rdynamic") --- 1756,1762 ---- AC_SUBST(COMPILATION_COMMENT) AC_MSG_CHECKING("need of special linking flags") ! if test "$TARGET_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes" then LDFLAGS="$LDFLAGS -rdynamic" AC_MSG_RESULT("-rdynamic") *************** *** 1873,1878 **** tell atod memcpy memmove \ setupterm strcasecmp sighold vidattr lrand48 localtime_r \ sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \ pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \ pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \ pthread_attr_getstacksize pthread_key_delete \ --- 1909,1915 ---- tell atod memcpy memmove \ setupterm strcasecmp sighold vidattr lrand48 localtime_r \ sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \ + sigaction sigemptyset sigaddset \ pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \ pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \ pthread_attr_getstacksize pthread_key_delete \ *************** *** 1884,1890 **** # Sanity check: We chould not have any fseeko symbol unless # large_file_support=yes AC_CHECK_FUNCS(fseeko, ! [if test "$large_file_support" = no -a "$IS_LINUX" = "true"; then AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!"); fi] --- 1921,1927 ---- # Sanity check: We chould not have any fseeko symbol unless # large_file_support=yes AC_CHECK_FUNCS(fseeko, ! [if test "$large_file_support" = no -a "$TARGET_LINUX" = "true"; then AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!"); fi] Loading
BUILD/SETUP.sh.rejdeleted 100644 → 0 +0 −19 Original line number Diff line number Diff line *************** *** 39,46 **** c_warnings="$global_warnings -Wunused" cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" ! alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet ! pentium_cflags="-mcpu=pentiumpro" sparc_cflags="" # be as fast as we can be without losing our ability to backtrace --- 39,46 ---- c_warnings="$global_warnings -Wunused" cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" ! #alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet ! #pentium_cflags="-mcpu=pentiumpro" sparc_cflags="" # be as fast as we can be without losing our ability to backtrace
config/ac-macros/misc.m4 +24 −0 Original line number Diff line number Diff line Loading @@ -790,3 +790,27 @@ esac AC_SUBST(AR) AC_SUBST(ARFLAGS) ]) dnl dnl Macro to check time_t range: according to C standard dnl array index must be greater than 0 => if time_t is signed, dnl the code in the macros below won't compile. dnl AC_DEFUN([MYSQL_CHECK_TIME_T],[ AC_MSG_CHECKING(if time_t is unsigned) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[ #include <time.h> ]], [[ int array[(((time_t)-1) > 0) ? 1 : -1]; ]] ) ], [ AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned]) AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no)] ) ])
config/ac-macros/zlib.m4 +12 −3 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ dnl Define zlib paths to point at bundled zlib AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [ ZLIB_INCLUDES="-I\$(top_srcdir)/zlib" ZLIB_LIBS="\$(top_builddir)/zlib/libz.la" ZLIB_LIBS="\$(top_builddir)/zlib/libzlt.la" dnl Omit -L$pkglibdir as it's always in the list of mysql_config deps. ZLIB_DEPS="-lz" zlib_dir="zlib" Loading @@ -10,16 +10,25 @@ AC_SUBST([zlib_dir]) mysql_cv_compress="yes" ]) dnl Auxiliary macro to check for zlib at given path dnl Auxiliary macro to check for zlib at given path. dnl We are strict with the server, as "archive" engine dnl needs zlibCompileFlags(), but for client only we dnl are less strict, and take the zlib we find. AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [ save_CPPFLAGS="$CPPFLAGS" save_LIBS="$LIBS" CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS" LIBS="$LIBS $ZLIB_LIBS" if test X"$with_server" = Xno then zlibsym=zlibVersion else zlibsym=zlibCompileFlags fi AC_CACHE_VAL([mysql_cv_compress], [AC_TRY_LINK([#include <zlib.h>], [return zlibCompileFlags();], [return $zlibsym();], [mysql_cv_compress="yes" AC_MSG_RESULT([ok])], [mysql_cv_compress="no"]) Loading
configure.in +3 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ NDB_VERSION_STATUS="" # Remember that regexps needs to quote [ and ] since this is run through m4 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"` MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'` MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION | sed -e 's|[[^0-9.]].*$||;s|$|.|' | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'` # The port should be constant for a LONG time MYSQL_TCP_PORT_DEFAULT=3306 Loading Loading @@ -1601,9 +1601,9 @@ fi # dlopen, dlerror case "$with_mysqld_ldflags " in *"-static "*) *"-all-static "*) # No need to check for dlopen when mysqld is linked with # -all-static or -static as it won't be able to load any functions. # -all-static as it won't be able to load any functions. # NOTE! It would be better if it was possible to test if dlopen # can be used, but a good way to test it couldn't be found Loading
configure.in.rejdeleted 100644 → 0 +0 −299 Original line number Diff line number Diff line *************** *** 388,402 **** if expr "$target_os" : "[[Ll]]inux.*" > /dev/null then MYSQLD_DEFAULT_SWITCHES="--skip-locking" ! IS_LINUX="true" AC_MSG_RESULT("yes"); else MYSQLD_DEFAULT_SWITCHES="" ! IS_LINUX="false" AC_MSG_RESULT("no"); fi AC_SUBST(MYSQLD_DEFAULT_SWITCHES) ! AC_SUBST(IS_LINUX) dnl Find paths to some shell programs AC_PATH_PROG(LN, ln, ln) --- 388,403 ---- if expr "$target_os" : "[[Ll]]inux.*" > /dev/null then MYSQLD_DEFAULT_SWITCHES="--skip-locking" ! TARGET_LINUX="true" AC_MSG_RESULT("yes"); + AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) else MYSQLD_DEFAULT_SWITCHES="" ! TARGET_LINUX="false" AC_MSG_RESULT("no"); fi AC_SUBST(MYSQLD_DEFAULT_SWITCHES) ! AC_SUBST(TARGET_LINUX) dnl Find paths to some shell programs AC_PATH_PROG(LN, ln, ln) *************** *** 576,582 **** # (this is true on the MySQL build machines to avoid NSS problems) # ! if test "$IS_LINUX" = "true" -a "$static_nss" = "" then tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r` if test -n "$tmp" --- 577,583 ---- # (this is true on the MySQL build machines to avoid NSS problems) # ! if test "$TARGET_LINUX" = "true" -a "$static_nss" = "" then tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r` if test -n "$tmp" *************** *** 827,833 **** ]) AC_SUBST(WRAPLIBS) ! if test "$IS_LINUX" = "true"; then AC_MSG_CHECKING([for atomic operations]) AC_LANG_SAVE --- 828,834 ---- ]) AC_SUBST(WRAPLIBS) ! if test "$TARGET_LINUX" = "true"; then AC_MSG_CHECKING([for atomic operations]) AC_LANG_SAVE *************** *** 870,876 **** [ USE_PSTACK=no ]) pstack_libs= pstack_dirs= ! if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no" then have_libiberty= have_libbfd= my_save_LIBS="$LIBS" --- 871,877 ---- [ USE_PSTACK=no ]) pstack_libs= pstack_dirs= ! if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no" then have_libiberty= have_libbfd= my_save_LIBS="$LIBS" *************** *** 1239,1301 **** # Hack for DEC-UNIX (OSF1) if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" then ! # Look for LinuxThreads. ! AC_MSG_CHECKING("LinuxThreads") ! grepres=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` ! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep LINUXTHREADS | wc -l || echo 0` ! if test "$grepres" -gt 0 -o "$getconfres" -gt 0 then ! AC_MSG_RESULT("Found") ! AC_DEFINE(HAVE_LINUXTHREADS) ! # Linux 2.0 sanity check ! AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], , ! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual])) ! # RedHat 5.0 does not work with dynamic linking of this. -static also ! # gives a speed increase in linux so it does not hurt on other systems. ! with_named_thread="-lpthread" ! else ! AC_MSG_RESULT("Not found") ! # If this is a linux machine we should barf ! AC_MSG_CHECKING("NPTL") ! if test "$IS_LINUX" = "true" ! then ! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep NPTL | wc -l || echo 0` ! if test "$getconfres" -gt 0 then ! AC_DEFINE(HAVE_LINUXTHREADS) dnl All this code predates NPTL, so "have linuxthreads" is a poor name. ! with_named_thread="-lpthread" else ! AC_MSG_ERROR([This is a Linux system and neither Linuxthreads nor NPTL were ! found. Please install Linuxthreads or a new glibc and try ! again. See the Installation chapter in the Reference Manual for ! more information.]) fi ! else ! AC_MSG_CHECKING("DEC threads") ! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthread -lmach -lexc" ! CFLAGS="$CFLAGS -D_REENTRANT" ! CXXFLAGS="$CXXFLAGS -D_REENTRANT" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! AC_MSG_CHECKING("DEC 3.2 threads") ! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthreads -lmach -lc_r" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_DEFINE(HAVE_DEC_3_2_THREADS) ! with_osf32_threads="yes" ! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority" ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! fi ! fi ! fi ! fi fi --- 1240,1337 ---- # Hack for DEC-UNIX (OSF1) if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" then ! AC_MSG_CHECKING("Linux threads") ! if test "$TARGET_LINUX" = "true" then ! AC_MSG_RESULT("starting") ! # use getconf to check glibc contents ! AC_MSG_CHECKING("getconf GNU_LIBPTHREAD_VERSION") ! case `getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` in ! NPTL* ) ! AC_MSG_RESULT("NPTL") ! AC_DEFINE([HAVE_NPTL], [1], [NPTL threads implementation]) ! with_named_thread="-lpthread" ! ;; ! LINUXTHREADS* ) ! AC_MSG_RESULT("Linuxthreads") ! AC_DEFINE([HAVE_LINUXTHREADS], [1], ! [Whether we are using Xavier Leroy's LinuxThreads]) ! with_named_thread="-lpthread" ! ;; ! * ) ! AC_MSG_RESULT("unknown") ! ;; ! esac ! if test "$with_named_thread" = "no" then ! # old method, check headers ! # Look for LinuxThreads. ! AC_MSG_CHECKING("LinuxThreads in header file comment") ! res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` ! if test "$res" -gt 0 ! then ! AC_MSG_RESULT("Found") ! AC_DEFINE([HAVE_LINUXTHREADS], [1], ! [Whether we are using Xavier Leroy's LinuxThreads]) ! # Linux 2.0 sanity check ! AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], , ! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual])) ! # RedHat 5.0 does not work with dynamic linking of this. -static also ! # gives a speed increase in linux so it does not hurt on other systems. ! with_named_thread="-lpthread" ! else ! AC_MSG_RESULT("Not found") ! # If this is a linux machine we should barf ! AC_MSG_ERROR([This is a Linux system without a working getconf, ! and Linuxthreads was not found. Please install it (or a new glibc) and try again. ! See the Installation chapter in the Reference Manual for more information.]) ! fi else ! AC_MSG_RESULT("no need to check headers") fi ! AC_MSG_CHECKING("for pthread_create in -lpthread"); ! ac_save_LIBS="$LIBS" ! LIBS="$LIBS -lpthread" ! AC_TRY_LINK( [#include <pthread.h>], ! [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], ! AC_MSG_RESULT("yes"), ! [ AC_MSG_RESULT("no") ! AC_MSG_ERROR([ ! This is a Linux system claiming to support threads, either Linuxthreads or NPTL, but linking a test program failed. ! Please install one of these (or a new glibc) and try again. ! See the Installation chapter in the Reference Manual for more information.]) ] ! ) ! LIBS="$ac_save_LIBS" ! else ! AC_MSG_RESULT("no") ! fi # "$TARGET_LINUX" ! fi # "$with_named_thread" = "no" -a "$with_mit_threads" = "no" ! ! if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" ! then ! AC_MSG_CHECKING("DEC threads") ! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthread -lmach -lexc" ! CFLAGS="$CFLAGS -D_REENTRANT" ! CXXFLAGS="$CXXFLAGS -D_REENTRANT" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! AC_MSG_CHECKING("DEC 3.2 threads") ! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a ! then ! with_named_thread="-lpthreads -lmach -lc_r" ! AC_DEFINE(HAVE_DEC_THREADS) ! AC_DEFINE(HAVE_DEC_3_2_THREADS) ! with_osf32_threads="yes" ! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority" ! AC_MSG_RESULT("yes") ! else ! AC_MSG_RESULT("no") ! fi ! fi fi *************** *** 1720,1726 **** AC_SUBST(COMPILATION_COMMENT) AC_MSG_CHECKING("need of special linking flags") ! if test "$IS_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes" then LDFLAGS="$LDFLAGS -rdynamic" AC_MSG_RESULT("-rdynamic") --- 1756,1762 ---- AC_SUBST(COMPILATION_COMMENT) AC_MSG_CHECKING("need of special linking flags") ! if test "$TARGET_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes" then LDFLAGS="$LDFLAGS -rdynamic" AC_MSG_RESULT("-rdynamic") *************** *** 1873,1878 **** tell atod memcpy memmove \ setupterm strcasecmp sighold vidattr lrand48 localtime_r \ sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \ pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \ pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \ pthread_attr_getstacksize pthread_key_delete \ --- 1909,1915 ---- tell atod memcpy memmove \ setupterm strcasecmp sighold vidattr lrand48 localtime_r \ sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \ + sigaction sigemptyset sigaddset \ pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \ pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \ pthread_attr_getstacksize pthread_key_delete \ *************** *** 1884,1890 **** # Sanity check: We chould not have any fseeko symbol unless # large_file_support=yes AC_CHECK_FUNCS(fseeko, ! [if test "$large_file_support" = no -a "$IS_LINUX" = "true"; then AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!"); fi] --- 1921,1927 ---- # Sanity check: We chould not have any fseeko symbol unless # large_file_support=yes AC_CHECK_FUNCS(fseeko, ! [if test "$large_file_support" = no -a "$TARGET_LINUX" = "true"; then AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!"); fi]