Commit f4ac6e76 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r7083] MPICH2 requires --enable-shared for all the packages that are based on

libtool, and --enable-sharedlibs=<type> for the MPICH2 core. To avoid
this confusion, if the user just provides --enable-shared alone,
assume --enable-sharedlibs=gcc as well.

Reviewed by goodell.
parent 0a51980e
......@@ -55,6 +55,9 @@ dnl will probably be defined, including symbols to specify how shared library
dnl search paths are specified and how shared library names are set.
dnl D*/
AC_DEFUN([PAC_ARG_SHAREDLIBS],[
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--enable-shared], [Enable shared library builds]),,
enable_shared=no)
AC_ARG_ENABLE(rpath,
[--enable-rpath - Determine whether the rpath is set when programs are compiled
and linked when shared libraries are built. The default is yes; use
......@@ -67,9 +70,16 @@ AC_ARG_ENABLE(sharedlibs,
solaris-cc - Solaris native (SPARC) compilers for 32 bit systems
cygwin-gcc - Special options for gcc needed only for cygwin
none - same as --disable-sharedlibs
Only gcc, osx-gcc, and solaris-cc are currently supported],
,enable_sharedlibs=none;enable_shared=no)
dnl
Only gcc, osx-gcc, and solaris-cc are currently supported],,enable_sharedlibs=default)
if test "$enable_sharedlibs" = "default" ; then
if test "$enable_shared" = "yes" ; then
enable_sharedlibs=gcc
else
enable_sharedlibs=none
fi
fi
CC_SHL=true
C_LINK_SHL=true
C_LINKPATH_SHL=""
......
......@@ -278,6 +278,9 @@ PAC_ARG_CACHING
# it may influence the output of the other tests
PAC_ARG_STRICT
# Check for shared library support
PAC_ARG_SHAREDLIBS
# Experimental library dependencies for shared libraries
AC_ARG_ENABLE(lib-depend,
[AC_HELP_STRING(--enable-lib-depend - Turn on library dependencies (experimental))],
......@@ -1607,8 +1610,6 @@ fi
ENABLE_SHLIB=$enable_sharedlibs
if test -z "$ENABLE_SHLIB" -o "$ENABLE_SHLIB" = "no" ; then
ENABLE_SHLIB=none
# Also turn off the libtool tests
enable_shared=no
fi
# We need the script that is used to create shared libraries if either
# we are creating shared libraries for MPICH2 or we are creating the
......@@ -2716,16 +2717,6 @@ dnl fi
AC_DEFINE_UNQUOTED(MPICH2_LIBDIR,$MPICH2_LIBDIR,[Name of installation directory intended for MPICH2])
fi
# ----------------------------------------------------------------------------
# Don't setup the shared libraries until we know which compiler we will be
# using
PAC_ARG_SHAREDLIBS
# We allow aliases for enable_sharedlibs, but after ARG_SHAREDLIBS,
# enable_sharedlibs contains the cannonical version
ENABLE_SHLIB="$enable_sharedlibs"
if test -z "$ENABLE_SHLIB" -o "$ENABLE_SHLIB" = "no" ; then
ENABLE_SHLIB=none
fi
# Special restrictions for some shared libraries
# It is difficult to import/export symbols from some shared libraries, so
# in that case, we require PMPILIBNAME and MPILIBNAME be the same
......
......@@ -55,6 +55,9 @@ dnl will probably be defined, including symbols to specify how shared library
dnl search paths are specified and how shared library names are set.
dnl D*/
AC_DEFUN([PAC_ARG_SHAREDLIBS],[
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--enable-shared], [Enable shared library builds]),,
enable_shared=no)
AC_ARG_ENABLE(rpath,
[--enable-rpath - Determine whether the rpath is set when programs are compiled
and linked when shared libraries are built. The default is yes; use
......@@ -67,9 +70,16 @@ AC_ARG_ENABLE(sharedlibs,
solaris-cc - Solaris native (SPARC) compilers for 32 bit systems
cygwin-gcc - Special options for gcc needed only for cygwin
none - same as --disable-sharedlibs
Only gcc, osx-gcc, and solaris-cc are currently supported],
,enable_sharedlibs=none;enable_shared=no)
dnl
Only gcc, osx-gcc, and solaris-cc are currently supported],,enable_sharedlibs=default)
if test "$enable_sharedlibs" = "default" ; then
if test "$enable_shared" = "yes" ; then
enable_sharedlibs=gcc
else
enable_sharedlibs=none
fi
fi
CC_SHL=true
C_LINK_SHL=true
C_LINKPATH_SHL=""
......
......@@ -55,6 +55,9 @@ dnl will probably be defined, including symbols to specify how shared library
dnl search paths are specified and how shared library names are set.
dnl D*/
AC_DEFUN([PAC_ARG_SHAREDLIBS],[
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--enable-shared], [Enable shared library builds]),,
enable_shared=no)
AC_ARG_ENABLE(rpath,
[--enable-rpath - Determine whether the rpath is set when programs are compiled
and linked when shared libraries are built. The default is yes; use
......@@ -67,9 +70,16 @@ AC_ARG_ENABLE(sharedlibs,
solaris-cc - Solaris native (SPARC) compilers for 32 bit systems
cygwin-gcc - Special options for gcc needed only for cygwin
none - same as --disable-sharedlibs
Only gcc, osx-gcc, and solaris-cc are currently supported],
,enable_sharedlibs=none;enable_shared=no)
dnl
Only gcc, osx-gcc, and solaris-cc are currently supported],,enable_sharedlibs=default)
if test "$enable_sharedlibs" = "default" ; then
if test "$enable_shared" = "yes" ; then
enable_sharedlibs=gcc
else
enable_sharedlibs=none
fi
fi
CC_SHL=true
C_LINK_SHL=true
C_LINKPATH_SHL=""
......
......@@ -55,6 +55,9 @@ dnl will probably be defined, including symbols to specify how shared library
dnl search paths are specified and how shared library names are set.
dnl D*/
AC_DEFUN([PAC_ARG_SHAREDLIBS],[
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--enable-shared], [Enable shared library builds]),,
enable_shared=no)
AC_ARG_ENABLE(rpath,
[--enable-rpath - Determine whether the rpath is set when programs are compiled
and linked when shared libraries are built. The default is yes; use
......@@ -67,9 +70,16 @@ AC_ARG_ENABLE(sharedlibs,
solaris-cc - Solaris native (SPARC) compilers for 32 bit systems
cygwin-gcc - Special options for gcc needed only for cygwin
none - same as --disable-sharedlibs
Only gcc, osx-gcc, and solaris-cc are currently supported],
,enable_sharedlibs=none;enable_shared=no)
dnl
Only gcc, osx-gcc, and solaris-cc are currently supported],,enable_sharedlibs=default)
if test "$enable_sharedlibs" = "default" ; then
if test "$enable_shared" = "yes" ; then
enable_sharedlibs=gcc
else
enable_sharedlibs=none
fi
fi
CC_SHL=true
C_LINK_SHL=true
C_LINKPATH_SHL=""
......
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