2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +00:00

comments, cleanups, simplification.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac148b@2425 e5f2f494-b856-4b98-b285-d166d9295462
This commit is contained in:
JINMEI Tatuya 2010-07-07 18:42:45 +00:00
parent 45085bd54e
commit 57f9f09688

View File

@ -18,6 +18,20 @@ AC_LANG([C++])
AM_CONDITIONAL(USE_GXX, test "X${GXX}" = "Xyes") AM_CONDITIONAL(USE_GXX, test "X${GXX}" = "Xyes")
AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"]) AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"])
# Linker options
# check -R rather than gcc specific -rpath to be as portable as possible.
AC_MSG_CHECKING([whether -R flag is available in linker])
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS -R/usr/lib"
AC_TRY_LINK([],[],
[ AC_MSG_RESULT(yes)
rpath_available=yes
],[ AC_MSG_RESULT(no)
rpath_available=no
])
LDFLAGS=$LDFLAGS_SAVED
# OS dependent compiler flags # OS dependent compiler flags
case "$host" in case "$host" in
*-solaris*) *-solaris*)
@ -84,23 +98,15 @@ else
fi fi
fi fi
rpath_available=no # Some OSes including NetBSD don't install libpython.so in a well known path.
if test "X$GXX" = "Xyes"; then # To avoid requiring dynamic library path with our python wrapper loadable
AC_MSG_CHECKING([whether -R flag is available in linker]) # modules, we embed the path to the modules when possible. We do this even
LDFLAGS_SAVED="$LDFLAGS" # when the path is known in the common operational environment (e.g. when
LDFLAGS="$LDFLAGS -Wl,-R/usr/lib" #it's stored in a comon "hint" file) for simplicity.
AC_TRY_LINK([],[],
[ AC_MSG_RESULT(yes)
rpath_available=yes
],[ AC_MSG_RESULT(no)
rpath_available=no
])
LDFLAGS=$LDFLAGS_SAVED
fi
if test $rpath_available = yes; then if test $rpath_available = yes; then
python_rpath= python_rpath=
for flag in ${PYTHON_LDFLAGS}; do for flag in ${PYTHON_LDFLAGS}; do
python_rpath="${python_rpath} -Wl,`echo $flag | sed -ne 's/^\(\-L\)/-R/p'`" python_rpath="${python_rpath} `echo $flag | sed -ne 's/^\(\-L\)/-R/p'`"
done done
PYTHON_LDFLAGS="${PYTHON_LDFLAGS} ${python_rpath}" PYTHON_LDFLAGS="${PYTHON_LDFLAGS} ${python_rpath}"
fi fi
@ -113,7 +119,6 @@ CPPFLAGS="$CPPFLAGS ${PYTHON_INCLUDES}"
AC_CHECK_HEADERS([Python.h],, AC_MSG_ERROR([Missing Python.h])) AC_CHECK_HEADERS([Python.h],, AC_MSG_ERROR([Missing Python.h]))
CPPFLAGS="$CPPFLAGS_SAVED" CPPFLAGS="$CPPFLAGS_SAVED"
# Check for python library. Needed for Python-wrapper libraries. # Check for python library. Needed for Python-wrapper libraries.
LDFLAGS_SAVED="$LDFLAGS" LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS" LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS"