Commit 841acab1 authored by unknown's avatar unknown

- merge some of the 4.0 configure.in modifications (mainly because

   of the static_nss stuff required for linking against the patched
   glibc)


configure.in:
   - Applied some modifications from the 4.0 configure.in to fix some
     typos and platform-specific issues (Solaris 2.6, Mac OS 10.2)
parent e4860747
...@@ -453,9 +453,13 @@ fi ...@@ -453,9 +453,13 @@ fi
NOINST_LDFLAGS= NOINST_LDFLAGS=
static_nss=""
AC_ARG_WITH(other-libc, AC_ARG_WITH(other-libc,
[ --with-other-libc=/path/to/other/libc/dir Link against libc and other standard libraries installed in the specified non-standard location overriding default. Originally added to be able to link against glibc 2.2 without making the user upgrade the standard libc installation ], [ --with-other-libc=DIR Link against libc and other standard libraries
installed in the specified non-standard location
overriding default. Originally added to be able to
link against glibc 2.2 without making the user
upgrade the standard libc installation.],
[ [
other_libc_include="$withval/include" other_libc_include="$withval/include"
other_libc_lib="$withval/lib" other_libc_lib="$withval/lib"
...@@ -469,7 +473,6 @@ AC_ARG_WITH(other-libc, ...@@ -469,7 +473,6 @@ AC_ARG_WITH(other-libc,
# by telling it to be permissive. Note that this option only works with # by telling it to be permissive. Note that this option only works with
# new versions of gcc (2.95.x and above) # new versions of gcc (2.95.x and above)
CXXFLAGS="$CXXFLAGS -fpermissive -I$other_libc_include" CXXFLAGS="$CXXFLAGS -fpermissive -I$other_libc_include"
static_nss=
if test -f "$other_libc_lib/libnss_files.a" if test -f "$other_libc_lib/libnss_files.a"
then then
# libc has been compiled with --enable-static-nss # libc has been compiled with --enable-static-nss
...@@ -504,6 +507,23 @@ AC_ARG_WITH(other-libc, ...@@ -504,6 +507,23 @@ AC_ARG_WITH(other-libc,
) )
AC_SUBST(NOINST_LDFLAGS) AC_SUBST(NOINST_LDFLAGS)
#
# Check if we are using Linux and a glibc compiled with static nss
# (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"
then
STATIC_NSS_FLAGS="-Wl,--start-group -lc -lnss_files -lnss_dns -lresolv \
-Wl,--end-group"
static_nss=1
fi
fi
AC_ARG_WITH(server-suffix, AC_ARG_WITH(server-suffix,
[ --with-server-suffix Append value to the version string.], [ --with-server-suffix Append value to the version string.],
# I heard that 'cut' isn't portable. Isn't there a better way? # I heard that 'cut' isn't portable. Isn't there a better way?
...@@ -690,6 +710,9 @@ AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind)) ...@@ -690,6 +710,9 @@ AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
AC_CHECK_LIB(crypt, crypt) AC_CHECK_LIB(crypt, crypt)
AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT)) AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT))
# For sem_xxx functions on Solaris 2.6
AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4))
# For compress in zlib # For compress in zlib
MYSQL_CHECK_ZLIB_WITH_COMPRESS($with_named_zlib) MYSQL_CHECK_ZLIB_WITH_COMPRESS($with_named_zlib)
...@@ -880,7 +903,7 @@ case $SYSTEM_TYPE in ...@@ -880,7 +903,7 @@ case $SYSTEM_TYPE in
fi fi
fi fi
;; ;;
*darwin*) *darwin5*)
if test "$ac_cv_prog_gcc" = "yes" if test "$ac_cv_prog_gcc" = "yes"
then then
CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH" CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH"
...@@ -889,6 +912,14 @@ case $SYSTEM_TYPE in ...@@ -889,6 +912,14 @@ case $SYSTEM_TYPE in
with_named_curses="" with_named_curses=""
fi fi
;; ;;
*darwin6*)
if test "$ac_cv_prog_gcc" = "yes"
then
CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH"
CXXFLAGS="$CXXFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ"
MAX_C_OPTIMIZE="-O"
fi
;;
*freebsd*) *freebsd*)
echo "Adding fix for interrupted reads" echo "Adding fix for interrupted reads"
CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000" CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
...@@ -953,7 +984,7 @@ then ...@@ -953,7 +984,7 @@ then
AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], , 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])) 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 # RedHat 5.0 does not work with dynamic linking of this. -static also
# gives a spped increase in linux so it does not hurt on other systems. # gives a speed increase in linux so it does not hurt on other systems.
with_named_thread="-lpthread" with_named_thread="-lpthread"
else else
AC_MSG_RESULT("Not found") AC_MSG_RESULT("Not found")
...@@ -961,9 +992,9 @@ then ...@@ -961,9 +992,9 @@ then
if test "$IS_LINUX" = "true" if test "$IS_LINUX" = "true"
then then
AC_MSG_ERROR([This is a linux system and Linuxthreads was not AC_MSG_ERROR([This is a linux system and Linuxthreads was not
found. On linux Linuxthreads should be used. So install Linuxthreads found. On linux Linuxthreads should be used. Please install Linuxthreads
(or a new glibc) and try again. See the Installation chapter in the (or a new glibc) and try again. See the Installation chapter in the
Reference Manual.]) Reference Manual for more information.])
else else
AC_MSG_CHECKING("DEC threads") 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 if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
...@@ -1332,7 +1363,7 @@ else ...@@ -1332,7 +1363,7 @@ else
CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS" CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS"
fi fi
# Force static compilation to avoid linking probles/get more speed # Force static compilation to avoid linking problems/get more speed
AC_ARG_WITH(mysqld-ldflags, AC_ARG_WITH(mysqld-ldflags,
[ --with-mysqld-ldflags Extra linking arguments for mysqld], [ --with-mysqld-ldflags Extra linking arguments for mysqld],
[MYSQLD_EXTRA_LDFLAGS=$withval], [MYSQLD_EXTRA_LDFLAGS=$withval],
...@@ -1695,7 +1726,7 @@ then ...@@ -1695,7 +1726,7 @@ then
AC_DEFINE(HAVE_READDIR_R) AC_DEFINE(HAVE_READDIR_R)
fi fi
# Check definition av posix sigwait() # Check definition of posix sigwait()
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait, AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
AC_TRY_LINK( AC_TRY_LINK(
[#if !defined(SCO) && !defined(__osf__) [#if !defined(SCO) && !defined(__osf__)
...@@ -1718,7 +1749,7 @@ fi ...@@ -1718,7 +1749,7 @@ fi
if test "$mysql_cv_sigwait" != "POSIX" if test "$mysql_cv_sigwait" != "POSIX"
then then
unset mysql_cv_sigwait unset mysql_cv_sigwait
# Check definition av posix sigwait() # Check definition of posix sigwait()
AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait, AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait,
AC_TRY_LINK( AC_TRY_LINK(
[#if !defined(SCO) && !defined(__osf__) [#if !defined(SCO) && !defined(__osf__)
...@@ -2284,8 +2315,9 @@ echo "latest release, upcoming features, and other information to make your" ...@@ -2284,8 +2315,9 @@ echo "latest release, upcoming features, and other information to make your"
echo "work or play with MySQL more productive. There you can also find" echo "work or play with MySQL more productive. There you can also find"
echo "information about mailing lists for MySQL discussion." echo "information about mailing lists for MySQL discussion."
echo echo
echo "Remember to check the platform specific part in the reference manual for" echo "Remember to check the platform specific part of the reference manual for"
echo "hints about installing on your platfrom. See the Docs directory." echo "hints about installing MySQL on your platform. Also have a look at the"
echo "files in the Docs directory."
echo echo
# The following text is checked in ./Do-compile to se that the configure ends. # The following text is checked in ./Do-compile to se that the configure ends.
echo "Thank you for choosing MySQL!" echo "Thank you for choosing MySQL!"
......
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