summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-09-06 14:39:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-09-06 14:39:59 (GMT)
commit95dae7f732a6c86670400174aa2c6e61ed71c146 (patch)
tree8515390f938626be339ee2f764ccf209ff4195d3 /unix/tcl.m4
parent33544f7bb7a292cf466608f7d90dbf80b942a56c (diff)
downloadtk-95dae7f732a6c86670400174aa2c6e61ed71c146.zip
tk-95dae7f732a6c86670400174aa2c6e61ed71c146.tar.gz
tk-95dae7f732a6c86670400174aa2c6e61ed71c146.tar.bz2
Add --disable-rpath option to configure script. Fixes [1231033f].
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m469
1 files changed, 44 insertions, 25 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 643984b..b54f7a1 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1033,6 +1033,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
do64bit=yes
fi
+ # Step 0.d: Disable -rpath support?
+
+ AC_MSG_CHECKING([if rpath support is requested])
+ AC_ARG_ENABLE(rpath,[ --disable-rpath disable rpath support (default: on)],
+ [doRpath=$enableval], [doRpath=yes])
+ AC_MSG_RESULT([$doRpath])
+
# Step 1: set the variable "system" to hold the name and version number
# for the system.
@@ -1165,7 +1172,7 @@ dnl AC_CHECK_TOOL(AR, ar)
;;
BeOS*)
SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="${CC} -nostart"
+ SHLIB_LD='${CC} -nostart'
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
@@ -1247,7 +1254,7 @@ dnl AC_CHECK_TOOL(AR, ar)
LD_LIBRARY_PATH_VAR="SHLIB_PATH"
fi
if test "$GCC" = "yes" ; then
- SHLIB_LD="gcc -shared"
+ SHLIB_LD='${CC} -shared'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
fi
@@ -1257,13 +1264,14 @@ dnl AC_CHECK_TOOL(AR, ar)
# Check to enable 64-bit flags for compiler/linker
if test "$do64bit" = "yes" ; then
if test "$GCC" = "yes" ; then
- hpux_arch=`${CC} -dumpmachine`
- case $hpux_arch in
+ case `${CC} -dumpmachine` in
hppa64*)
# 64-bit gcc in use. Fix flags for GNU ld.
do64bit_ok=yes
- SHLIB_LD="${CC} -shared"
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ SHLIB_LD='${CC} -shared'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ fi
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
;;
*)
@@ -1309,8 +1317,10 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ fi
;;
IRIX-6.*)
SHLIB_CFLAGS=""
@@ -1318,8 +1328,10 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ fi
if test "$GCC" = "yes" ; then
CFLAGS="$CFLAGS -mabi=n32"
LDFLAGS="$LDFLAGS -mabi=n32"
@@ -1342,8 +1354,10 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ fi
# Check to enable 64-bit flags for compiler/linker
@@ -1373,7 +1387,9 @@ dnl AC_CHECK_TOOL(AR, ar)
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ fi
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
else
AC_CHECK_HEADER(dld.h, [
@@ -1444,8 +1460,10 @@ dnl AC_CHECK_TOOL(AR, ar)
DL_OBJS="tclLoadDl.o"
DL_LIBS="-mshared -ldl"
LD_FLAGS="-Wl,--export-dynamic"
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ fi
;;
MP-RAS-02*)
SHLIB_CFLAGS="-K PIC"
@@ -1477,8 +1495,10 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ fi
AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
AC_EGREP_CPP(yes, [
#ifdef __ELF__
@@ -1532,7 +1552,9 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ fi
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
@@ -1781,8 +1803,10 @@ dnl AC_CHECK_TOOL(AR, ar)
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test $doRpath = yes ; then
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ fi
if test "$GCC" = "yes" ; then
CFLAGS="$CFLAGS -mieee"
else
@@ -2537,11 +2561,6 @@ AC_DEFUN([SC_BLOCKING_STYLE], [
SC_CONFIG_SYSTEM
AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
case $system in
- # There used to be code here to use FIONBIO under AIX. However, it
- # was reported that FIONBIO doesn't work under AIX 3.2.5. Since
- # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
- # code (JO, 5/31/97).
-
OSF*)
AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
AC_MSG_RESULT([FIONBIO])