Split up shared and static flags for CHICKEN detection.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4497 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Jonah Beckford 2003-03-10 19:09:57 +00:00
commit 35beb92c55

View file

@ -1049,9 +1049,13 @@ if test -n "$CHICKEN_CONFIG" ; then
AC_ARG_WITH(chickhme,[ --with-chickenhome=path Set location of CHICKEN home directory],[
CHICKENHOME="$withval"], [CHICKENHOME=])
AC_ARG_WITH(chickopt,[ --with-chickenopts=path Set compiler options for CHICKEN generated code],[
AC_ARG_WITH(chickops,[ --with-chickensharedopts=path Set compiler options for shared CHICKEN generated code],[
CHICKENSHAREDOPTS="$withval"], [CHICKENSHAREDOPTS=])
AC_ARG_WITH(chickopt,[ --with-chickenopts=path Set compiler options for static CHICKEN generated code],[
CHICKENOPTS="$withval"], [CHICKENOPTS=])
AC_ARG_WITH(chicklib,[ --with-chickenlib=path Set linker options for CHICKEN generated code],[
AC_ARG_WITH(chicklis,[ --with-chickensharedlib=path Set linker options for shared CHICKEN generated code],[
CHICKENSHAREDLIB="$withval"], [CHICKENSHAREDLIB=])
AC_ARG_WITH(chicklib,[ --with-chickenlib=path Set linker options for static CHICKEN generated code],[
CHICKENLIB="$withval"], [CHICKENLIB=])
AC_MSG_CHECKING(for CHICKEN home directory)
@ -1067,7 +1071,19 @@ if test -n "$CHICKEN_CONFIG" ; then
AC_MSG_RESULT(not found)
fi
AC_MSG_CHECKING(for compiler options for CHICKEN generated code)
AC_MSG_CHECKING(for compiler options for shared CHICKEN generated code)
if test -z "$CHICKENSHAREDOPTS"; then
CHICKENSHAREDOPTS="`chicken-config -shared -cflags`"
else
CHICKENSHAREDOPTS="`chicken-config -shared -cflags` $CHICKENSHAREDOPTS"
fi
if test -z "$CHICKENSHAREDOPTS"; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT($CHICKENSHAREDOPTS)
fi
AC_MSG_CHECKING(for compiler options for static CHICKEN generated code)
if test -z "$CHICKENOPTS"; then
CHICKENOPTS="`chicken-config -cflags`"
else
@ -1079,13 +1095,27 @@ if test -n "$CHICKEN_CONFIG" ; then
AC_MSG_RESULT($CHICKENOPTS)
fi
AC_MSG_CHECKING(for linker options for CHICKEN generated code)
AC_MSG_CHECKING(for linker options for shared CHICKEN generated code)
dirs="$CHICKENSHAREDLIB `chicken-config -shared -libs -extra-libs | sed s/-L//g`"
for i in $dirs ; do
if test -r $i/libchicken.a; then
AC_MSG_RESULT(libraries found in $i)
CHICKENSHAREDLIB="$CHICKENSHAREDLIB `chicken-config -shared -extra-libs`"
CHICKENSHAREDLIB="$CHICKENSHAREDLIB `chicken-config -shared -libs`"
break
fi
done
if test -z "$CHICKENSHAREDLIB"; then
AC_MSG_RESULT(not found)
fi
AC_MSG_CHECKING(for linker options for static CHICKEN generated code)
dirs="$CHICKENLIB `chicken-config -libs -extra-libs | sed s/-L//g`"
for i in $dirs ; do
if test -r $i/libchicken.a; then
AC_MSG_RESULT(libraries found in $i)
CHICKENLIB="$CHICKENLIB `chicken-config -libs`"
CHICKENLIB="$CHICKENLIB `chicken-config -extra-libs`"
CHICKENLIB="$CHICKENLIB `chicken-config -libs`"
break
fi
done
@ -1099,7 +1129,9 @@ AC_SUBST(CHICKEN)
AC_SUBST(CHICKEN_CONFIG)
AC_SUBST(CHICKENHOME)
AC_SUBST(CHICKENOPTS)
AC_SUBST(CHICKENSHAREDOPTS)
AC_SUBST(CHICKENLIB)
AC_SUBST(CHICKENSHAREDLIB)
#----------------------------------------------------------------
# Look for csharp