summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-03-06 19:53:31 +0200
committerunknown <monty@hundin.mysql.fi>2002-03-06 19:53:31 +0200
commitb707a1ab6b3e1c1fed2570f91da0e22715542493 (patch)
tree2b4665ab89a9c440f5e2f451d1d745df1c15288d /configure.in
parenta5deff2bc90a17f4c3c19937b08660a78a085060 (diff)
parentd6998363afc004fd92248af521ed40fa52027954 (diff)
downloadmariadb-git-b707a1ab6b3e1c1fed2570f91da0e22715542493.tar.gz
merge
BitKeeper/etc/logging_ok: auto-union Build-tools/Do-all-build-steps: Auto merged Build-tools/Do-compile: Auto merged Build-tools/Do-rpm: Auto merged Docs/manual.texi: Auto merged include/hash.h: Auto merged include/my_sys.h: Auto merged innobase/dict/dict0dict.c: Auto merged libmysql/libmysql.c: Auto merged mysql-test/t/type_date.test: Auto merged mysys/array.c: Auto merged mysys/hash.c: Auto merged mysys/mf_qsort.c: Auto merged scripts/mysqld_safe.sh: Auto merged scripts/mysqlhotcopy.sh: Auto merged sql/item_timefunc.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql-bench/server-cfg.sh: Auto merged strings/Makefile.am: Auto merged
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in43
1 files changed, 41 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index f8f5d88369b..e30eb049cb3 100644
--- a/configure.in
+++ b/configure.in
@@ -426,6 +426,7 @@ fi
NOINST_LDFLAGS=
+
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 ],
[
@@ -439,8 +440,27 @@ AC_ARG_WITH(other-libc,
#There seems to be a feature in gcc that treats system and libc headers
#leniently when they violatate ANSI C++ standard, but it is strict otherwise
#since gcc cannot now recognize that our headers are libc, we work around
-#by telling it to be permissive
- LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
+#by telling it to be permissive
+ static_nss=
+ if test -f "$other_libc_lib/libnss_files.a"
+ then
+ # libc has been compiled with --enable-static-nss
+ # we need special flags, but we will have to add those later
+ STATIC_NSS_FLAGS="-Wl,--start-group -lc -lnss_files -lnss_dns -lresolv \
+ -Wl,--end-group"
+ static_nss=1
+ else
+ # this is a dirty hack. We if we detect static nss glibc in the special
+ # location, we do not re-direct the linker to get libraries from there
+ # during check. The reason is that if we did, we would have to find a
+ # way to append the special static nss flags to LIBS every time we do
+ # any check - this is definitely feasible, but not worthwhile the risk
+ # of breaking other things. So for our purposes it would be sufficient
+ # to assume that whoever is using static NSS knows what he is doing and
+ # has sensible libraries in the regular location
+ LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
+ fi
+
with_mysqld_ldflags="-all-static"
with_client_ldflags="-all-static"
NOINST_LDFLAGS="-all-static"
@@ -591,6 +611,8 @@ AC_ARG_ENABLE(local-infile,
[ ENABLED_LOCAL_INFILE=no ]
)
+AC_SUBST(ENABLE_LOCAL_INFILE)
+
# Use Paul Eggerts macros from GNU tar to check for large file support.
MYSQL_SYS_LARGEFILE
@@ -2114,6 +2136,12 @@ then
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
AC_DEFINE(THREAD_SAFE_CLIENT)
fi
+
+if test "$static_nss" = "1"
+then
+ CLIENT_LIBS="$CLIENT_LIBS $STATIC_NSS_FLAGS"
+fi
+
AC_SUBST(CLIENT_LIBS)
AC_SUBST(sql_client_dirs)
AC_SUBST(linked_client_targets)
@@ -2254,6 +2282,17 @@ EOF
LIBS="$MT_LD_ADD $LIBS"
fi
fi
+
+#IMPORTANT - do not modify LIBS past this line - this hack is the only way
+# I know to add the static NSS magic if we have static NSS libraries with
+# glibc - Sasha
+
+if test "$static_nss" = "1"
+then
+ LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
+ LIBS="$LIBS $STATIC_NSS_FLAGS"
+fi
+
AC_SUBST(sql_server_dirs)
AC_SUBST(thread_dirs)
AC_SUBST(server_scripts)