OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [win/] [configure.in] - Diff between revs 578 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 578 Rev 1765
dnl This whole file is CYGNUS LOCAL
dnl This whole file is CYGNUS LOCAL
dnl     This file is an input file used by the GNU "autoconf" program to
dnl     This file is an input file used by the GNU "autoconf" program to
dnl     generate the file "configure", which is run during [incr Tcl]
dnl     generate the file "configure", which is run during [incr Tcl]
dnl installation to configure the system for the local environment.
dnl installation to configure the system for the local environment.
AC_PREREQ(2.5)
AC_PREREQ(2.5)
AC_INIT(../generic/itcl.h)
AC_INIT(../generic/itcl.h)
AC_CONFIG_AUX_DIR(../../../)
AC_CONFIG_AUX_DIR(../../../)
AC_CANONICAL_HOST
AC_CANONICAL_HOST
AC_PROG_RANLIB
AC_PROG_RANLIB
AC_PROG_CC
AC_PROG_CC
AC_OBJEXT
AC_OBJEXT
NM=${NM-nm}
NM=${NM-nm}
AC_SUBST(NM)
AC_SUBST(NM)
AS=${AS-as}
AS=${AS-as}
AC_SUBST(AS)
AC_SUBST(AS)
LD=${LD-ld}
LD=${LD-ld}
AC_SUBST(LD)
AC_SUBST(LD)
DLLTOOL=${DLLTOOL-dlltool}
DLLTOOL=${DLLTOOL-dlltool}
AC_SUBST(DLLTOOL)
AC_SUBST(DLLTOOL)
WINDRES=${WINDRES-windres}
WINDRES=${WINDRES-windres}
AC_SUBST(WINDRES)
AC_SUBST(WINDRES)
AC_PROG_INSTALL
AC_PROG_INSTALL
# needed for the subtle differences between cygwin and mingw32
# needed for the subtle differences between cygwin and mingw32
case "${host}" in
case "${host}" in
*-*-cygwin*)
*-*-cygwin*)
        TCL_ALLOC_OBJ=
        TCL_ALLOC_OBJ=
        DLL_LDLIBS=-lcygwin
        DLL_LDLIBS=-lcygwin
        DLL_LDFLAGS='-nostartfiles -Wl,--dll'
        DLL_LDFLAGS='-nostartfiles -Wl,--dll'
        ;;
        ;;
*-*-mingw32*)
*-*-mingw32*)
        TCL_ALLOC_OBJ='$(TMPDIR)/tclAlloc.o'
        TCL_ALLOC_OBJ='$(TMPDIR)/tclAlloc.o'
        DLL_LDLIBS=
        DLL_LDLIBS=
        DLL_LDFLAGS='-mdll'
        DLL_LDFLAGS='-mdll'
        ;;
        ;;
esac
esac
AC_SUBST(DLL_LDFLAGS)
AC_SUBST(DLL_LDFLAGS)
AC_SUBST(DLL_LDLIBS)
AC_SUBST(DLL_LDLIBS)
ITCL_VERSION=3.0
ITCL_VERSION=3.0
ITCL_MAJOR_VERSION=3
ITCL_MAJOR_VERSION=3
ITCL_MINOR_VERSION=0
ITCL_MINOR_VERSION=0
VERSION=${ITCL_MAJOR_VERSION}${ITCL_MINOR_VERSION}
VERSION=${ITCL_MAJOR_VERSION}${ITCL_MINOR_VERSION}
if test "${prefix}" = "NONE"; then
if test "${prefix}" = "NONE"; then
    prefix=/usr/local
    prefix=/usr/local
fi
fi
if test "${exec_prefix}" = "NONE"; then
if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$prefix
    exec_prefix=$prefix
fi
fi
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
#   Set up a new default --prefix.  If a previous installation of
#   Set up a new default --prefix.  If a previous installation of
#   [incr Tcl] can be found searching $PATH use that directory.
#   [incr Tcl] can be found searching $PATH use that directory.
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
AC_PREFIX_DEFAULT(/usr/local)
AC_PREFIX_DEFAULT(/usr/local)
AC_PREFIX_PROGRAM(itkwish)
AC_PREFIX_PROGRAM(itkwish)
if test "${prefix}" = "NONE"; then
if test "${prefix}" = "NONE"; then
    prefix=/usr/local
    prefix=/usr/local
fi
fi
if test "${exec_prefix}" = "NONE"; then
if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$prefix
    exec_prefix=$prefix
fi
fi
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
BUILD_DIR=`pwd`
BUILD_DIR=`pwd`
ITCL_SRC_DIR=`cd $srcdir/..; pwd`
ITCL_SRC_DIR=`cd $srcdir/..; pwd`
if ! test "$GCC" = yes; then
if ! test "$GCC" = yes; then
    tmp="`cygpath --windows $ITCL_SRC_DIR`"
    tmp="`cygpath --windows $ITCL_SRC_DIR`"
    ITCL_SRC_DIR="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
    ITCL_SRC_DIR="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
fi
fi
cd ${BUILD_DIR}
cd ${BUILD_DIR}
AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available],
AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available],
    [itcl_ok=$enableval], [itcl_ok=no])
    [itcl_ok=$enableval], [itcl_ok=no])
if test "$itcl_ok" = "yes"; then
if test "$itcl_ok" = "yes"; then
    AC_PROG_CC
    AC_PROG_CC
else
else
    CC=${CC-cc}
    CC=${CC-cc}
AC_SUBST(CC)
AC_SUBST(CC)
fi
fi
AC_HAVE_HEADERS(unistd.h limits.h)
AC_HAVE_HEADERS(unistd.h limits.h)
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   See if there was a command-line option for where Tcl is;  if
#   See if there was a command-line option for where Tcl is;  if
#   not, assume that its top-level directory is a sibling of ours.
#   not, assume that its top-level directory is a sibling of ours.
# CYGNUS LOCAL - Actually, tcl is one level higher - a sibling of the
# CYGNUS LOCAL - Actually, tcl is one level higher - a sibling of the
# itcl directory that contains itcl proper, itk & iwidgets.
# itcl directory that contains itcl proper, itk & iwidgets.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.0 binaries from DIR],
AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.0 binaries from DIR],
        TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../../tcl/win; pwd`)
        TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../../tcl/win; pwd`)
if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then
if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then
    TCL_BIN_DIR=`cd ../../../tcl8.1/win;pwd`
    TCL_BIN_DIR=`cd ../../../tcl8.1/win;pwd`
fi
fi
if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then
if test ! -f $TCL_BIN_DIR/../unix/tclConfig.sh; then
    AC_MSG_ERROR(There's no tclConfig.sh in $TCL_BIN_DIR;  perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
    AC_MSG_ERROR(There's no tclConfig.sh in $TCL_BIN_DIR;  perhaps you didn't specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)
fi
fi
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   Read in configuration information generated by Tcl for shared
#   Read in configuration information generated by Tcl for shared
#   libraries, and arrange for it to be substituted into our
#   libraries, and arrange for it to be substituted into our
#   Makefile.
#   Makefile.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
file=$TCL_BIN_DIR/../unix/tclConfig.sh
file=$TCL_BIN_DIR/../unix/tclConfig.sh
. $file
. $file
dnl CFLAGS=$TCL_CFLAGS
dnl CFLAGS=$TCL_CFLAGS
SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
SHLIB_LD=$TCL_SHLIB_LD
SHLIB_LD=$TCL_SHLIB_LD
SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
SHLIB_VERSION=$TCL_SHLIB_VERSION
SHLIB_VERSION=$TCL_SHLIB_VERSION
DL_LIBS=$TCL_DL_LIBS
DL_LIBS=$TCL_DL_LIBS
LD_FLAGS=$TCL_LD_FLAGS
LD_FLAGS=$TCL_LD_FLAGS
ITCL_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
ITCL_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
AC_MSG_CHECKING([whether C compiler is gcc])
AC_MSG_CHECKING([whether C compiler is gcc])
AC_CACHE_VAL(itcl_cv_prog_gcc, [
AC_CACHE_VAL(itcl_cv_prog_gcc, [
    AC_EGREP_CPP(_cc_is_gcc_, [
    AC_EGREP_CPP(_cc_is_gcc_, [
#ifdef __GNUC__
#ifdef __GNUC__
_cc_is_gcc_
_cc_is_gcc_
#endif
#endif
],      [itcl_cv_prog_gcc=yes], [itcl_cv_prog_gcc=no])])
],      [itcl_cv_prog_gcc=yes], [itcl_cv_prog_gcc=no])])
AC_MSG_RESULT([$itcl_cv_prog_gcc])
AC_MSG_RESULT([$itcl_cv_prog_gcc])
if test -z "$CFLAGS" ; then
if test -z "$CFLAGS" ; then
    CFLAGS="-O"
    CFLAGS="-O"
fi
fi
if test "$itcl_cv_prog_gcc" = "yes" ; then
if test "$itcl_cv_prog_gcc" = "yes" ; then
    CFLAGS="$CFLAGS -Wshadow -Wtraditional -Wall"
    CFLAGS="$CFLAGS -Wshadow -Wtraditional -Wall"
fi
fi
AC_MSG_CHECKING([default compiler flags])
AC_MSG_CHECKING([default compiler flags])
AC_ARG_WITH(cflags, [  --with-cflags=FLAGS     set compiler flags to FLAGS],
AC_ARG_WITH(cflags, [  --with-cflags=FLAGS     set compiler flags to FLAGS],
    [CFLAGS="$with_cflags"])
    [CFLAGS="$with_cflags"])
AC_MSG_RESULT([$CFLAGS])
AC_MSG_RESULT([$CFLAGS])
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   Supply a substitute for stdlib.h if it doesn't define strtol,
#   Supply a substitute for stdlib.h if it doesn't define strtol,
#   strtoul, or strtod (which it doesn't in some versions of SunOS).
#   strtoul, or strtod (which it doesn't in some versions of SunOS).
#--------------------------------------------------------------------
#--------------------------------------------------------------------
AC_MSG_CHECKING(stdlib.h)
AC_MSG_CHECKING(stdlib.h)
AC_HEADER_EGREP(strtol, stdlib.h, itcl_ok=yes, itcl_ok=no)
AC_HEADER_EGREP(strtol, stdlib.h, itcl_ok=yes, itcl_ok=no)
AC_HEADER_EGREP(strtoul, stdlib.h, , itcl_ok=no)
AC_HEADER_EGREP(strtoul, stdlib.h, , itcl_ok=no)
AC_HEADER_EGREP(strtod, stdlib.h, , itcl_ok=no)
AC_HEADER_EGREP(strtod, stdlib.h, , itcl_ok=no)
if test $itcl_ok = no; then
if test $itcl_ok = no; then
    AC_DEFINE(NO_STDLIB_H)
    AC_DEFINE(NO_STDLIB_H)
fi
fi
AC_MSG_RESULT($itcl_ok)
AC_MSG_RESULT($itcl_ok)
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   Check for various typedefs and provide substitutes if
#   Check for various typedefs and provide substitutes if
#   they don't exist.
#   they don't exist.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
AC_MODE_T
AC_MODE_T
AC_PID_T
AC_PID_T
AC_SIZE_T
AC_SIZE_T
AC_UID_T
AC_UID_T
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   Check for the existence of various libraries.  The order here
#   Check for the existence of various libraries.  The order here
#   is important, so that then end up in the right order in the
#   is important, so that then end up in the right order in the
#   command line generated by make.  The -lsocket and -lnsl libraries
#   command line generated by make.  The -lsocket and -lnsl libraries
#   require a couple of special tricks:
#   require a couple of special tricks:
#   1. Use "connect" and "accept" to check for -lsocket, and
#   1. Use "connect" and "accept" to check for -lsocket, and
#      "gethostbyname" to check for -lnsl.
#      "gethostbyname" to check for -lnsl.
#   2. Use each function name only once:  can't redo a check because
#   2. Use each function name only once:  can't redo a check because
#      autoconf caches the results of the last check and won't redo it.
#      autoconf caches the results of the last check and won't redo it.
#   3. Use -lnsl and -lsocket only if they supply procedures that
#   3. Use -lnsl and -lsocket only if they supply procedures that
#      aren't already present in the normal libraries.  This is because
#      aren't already present in the normal libraries.  This is because
#      IRIX 5.2 has libraries, but they aren't needed and they're
#      IRIX 5.2 has libraries, but they aren't needed and they're
#      bogus:  they goof up name resolution if used.
#      bogus:  they goof up name resolution if used.
#   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
#   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
#      To get around this problem, check for both libraries together
#      To get around this problem, check for both libraries together
#      if -lsocket doesn't work by itself.
#      if -lsocket doesn't work by itself.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
itcl_checkBoth=0
itcl_checkBoth=0
AC_CHECK_FUNC(connect, itcl_checkSocket=0, itcl_checkSocket=1)
AC_CHECK_FUNC(connect, itcl_checkSocket=0, itcl_checkSocket=1)
if test "$itcl_checkSocket" = 1; then
if test "$itcl_checkSocket" = 1; then
    AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", itcl_checkBoth=1)
    AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", itcl_checkBoth=1)
fi
fi
if test "$itcl_checkBoth" = 1; then
if test "$itcl_checkBoth" = 1; then
    itcl_oldLibs=$LIBS
    itcl_oldLibs=$LIBS
    LIBS="$LIBS -lsocket -lnsl"
    LIBS="$LIBS -lsocket -lnsl"
    AC_CHECK_FUNC(accept, itcl_checkNsl=0, [LIBS=$itcl_oldLibs])
    AC_CHECK_FUNC(accept, itcl_checkNsl=0, [LIBS=$itcl_oldLibs])
fi
fi
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   On a few very rare systems, all of the libm.a stuff is
#   On a few very rare systems, all of the libm.a stuff is
#   already in libc.a.  Set compiler flags accordingly.
#   already in libc.a.  Set compiler flags accordingly.
#   Also, Linux requires the "ieee" library for math to
#   Also, Linux requires the "ieee" library for math to
#   work right (and it must appear before "-lm").
#   work right (and it must appear before "-lm").
#--------------------------------------------------------------------
#--------------------------------------------------------------------
MATH_LIBS=""
MATH_LIBS=""
AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   If this system doesn't have a memmove procedure, use memcpy
#   If this system doesn't have a memmove procedure, use memcpy
#   instead.
#   instead.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
AC_CHECK_FUNC(memmove, , [AC_DEFINE(memmove, memcpy)])
AC_CHECK_FUNC(memmove, , [AC_DEFINE(memmove, memcpy)])
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   Figure out whether "char" is unsigned.  If so, set a
#   Figure out whether "char" is unsigned.  If so, set a
#   #define for __CHAR_UNSIGNED__.
#   #define for __CHAR_UNSIGNED__.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#AC_C_CHAR_UNSIGNED
#AC_C_CHAR_UNSIGNED
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   Under Solaris 2.4, strtod returns the wrong value for the
#   Under Solaris 2.4, strtod returns the wrong value for the
#   terminating character under some conditions.  Check for this
#   terminating character under some conditions.  Check for this
#   and if the problem exists use a substitute procedure
#   and if the problem exists use a substitute procedure
#   "fixstrtod" (provided by Tcl) that corrects the error.
#   "fixstrtod" (provided by Tcl) that corrects the error.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
AC_CHECK_FUNC(strtod, itcl_strtod=1, itcl_strtod=0)
AC_CHECK_FUNC(strtod, itcl_strtod=1, itcl_strtod=0)
if test "$itcl_strtod" = 1; then
if test "$itcl_strtod" = 1; then
    AC_MSG_CHECKING([for Solaris 2.4 strtod bug])
    AC_MSG_CHECKING([for Solaris 2.4 strtod bug])
    AC_TRY_RUN([
    AC_TRY_RUN([
        extern double strtod();
        extern double strtod();
        int main()
        int main()
        {
        {
            char *string = "NaN";
            char *string = "NaN";
            char *term;
            char *term;
            strtod(string, &term);
            strtod(string, &term);
            if ((term != string) && (term[-1] == 0)) {
            if ((term != string) && (term[-1] == 0)) {
                exit(1);
                exit(1);
            }
            }
            exit(0);
            exit(0);
        }], itcl_ok=1, itcl_ok=0, itcl_ok=0)
        }], itcl_ok=1, itcl_ok=0, itcl_ok=0)
    if test "$itcl_ok" = 1; then
    if test "$itcl_ok" = 1; then
        AC_MSG_RESULT(ok)
        AC_MSG_RESULT(ok)
    else
    else
        AC_MSG_RESULT(buggy)
        AC_MSG_RESULT(buggy)
        AC_DEFINE(strtod, fixstrtod)
        AC_DEFINE(strtod, fixstrtod)
    fi
    fi
fi
fi
#--------------------------------------------------------------------
#--------------------------------------------------------------------
# If we are building with cygwin, we need one set of library names,
# If we are building with cygwin, we need one set of library names,
# otherwise, we need the Source-Navigator set.
# otherwise, we need the Source-Navigator set.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
    CYGITCLLIBSPEC=itcl${VERSION}
    CYGITCLLIBSPEC=itcl${VERSION}
else
else
    CYGITCLLIBSPEC="itcl`echo ${VERSION} | tr -d .`"
    CYGITCLLIBSPEC="itcl`echo ${VERSION} | tr -d .`"
fi
fi
CYGITCLLIB=lib${CYGITCLLIBSPEC}.a
CYGITCLLIB=lib${CYGITCLLIBSPEC}.a
CYGITCLDLL=cygitcl${VERSION}.dll
CYGITCLDLL=cygitcl${VERSION}.dll
CYGITCLSH=cygitclsh${VERSION}.exe
CYGITCLSH=cygitclsh${VERSION}.exe
CYGITCLDEF=itclcyg.def
CYGITCLDEF=itclcyg.def
CYGITCLTEST=cygitcltest.exe
CYGITCLTEST=cygitcltest.exe
CYGIMPORTLIB=cygitcl${VERSION}.lib
CYGIMPORTLIB=cygitcl${VERSION}.lib
CYGITCLRES=cygitcl.o
CYGITCLRES=cygitcl.o
CYGITCLSHRES=cygitclsh.o
CYGITCLSHRES=cygitclsh.o
SNITCLLIBSPEC=itcl30.lib
SNITCLLIBSPEC=itcl30.lib
SNITCLLIB=${SNITCLLIBSPEC}
SNITCLLIB=${SNITCLLIBSPEC}
SNITCLDLL=snitcl30.dll
SNITCLDLL=snitcl30.dll
SNITCLSH=snitclsh30.exe
SNITCLSH=snitclsh30.exe
SNITCLDEF=itclsn.def
SNITCLDEF=itclsn.def
SNITCLTEST=snitcltest.exe
SNITCLTEST=snitcltest.exe
SNIMPORTLIB=snitcl30.lib
SNIMPORTLIB=snitcl30.lib
SNITCLRES=snitcl.obj
SNITCLRES=snitcl.obj
SNITCLSHRES=snitclsh.obj
SNITCLSHRES=snitclsh.obj
if test "$GCC" = yes; then
if test "$GCC" = yes; then
ITCLLIBSPEC=${CYGITCLLIBSPEC}
ITCLLIBSPEC=${CYGITCLLIBSPEC}
ITCLLIB=${CYGITCLLIB}
ITCLLIB=${CYGITCLLIB}
ITCLDLL=${CYGITCLDLL}
ITCLDLL=${CYGITCLDLL}
ITCLSH=${CYGITCLSH}
ITCLSH=${CYGITCLSH}
ITCLDEF=${CYGITCLDEF}
ITCLDEF=${CYGITCLDEF}
ITCLTEST=${CYGITCLTEST}
ITCLTEST=${CYGITCLTEST}
ITCLIMPORTLIB=${CYGIMPORTLIB}
ITCLIMPORTLIB=${CYGIMPORTLIB}
ITCLRES=${CYGITCLRES}
ITCLRES=${CYGITCLRES}
ITCLSHRES=${CYGITCLSHRES}
ITCLSHRES=${CYGITCLSHRES}
else
else
ITCLLIBSPEC=${SNITCLLIBSPEC}
ITCLLIBSPEC=${SNITCLLIBSPEC}
ITCLLIB=${SNITCLLIB}
ITCLLIB=${SNITCLLIB}
ITCLDLL=${SNITCLDLL}
ITCLDLL=${SNITCLDLL}
ITCLSH=${SNITCLSH}
ITCLSH=${SNITCLSH}
ITCLDEF=${SNITCLDEF}
ITCLDEF=${SNITCLDEF}
ITCLTEST=${SNITCLTEST}
ITCLTEST=${SNITCLTEST}
ITCLIMPORTLIB=${SNIMPORTLIB}
ITCLIMPORTLIB=${SNIMPORTLIB}
ITCLRES=${SNITCLRES}
ITCLRES=${SNITCLRES}
ITCLSHRES=${SNITCLSHRES}
ITCLSHRES=${SNITCLSHRES}
fi
fi
ITCL_SH="`pwd`/${ITCLSH}"
ITCL_SH="`pwd`/${ITCLSH}"
if ! test "$GCC" = yes; then
if ! test "$GCC" = yes; then
    tmp="`cygpath --windows $ITCL_SH`"
    tmp="`cygpath --windows $ITCL_SH`"
    ITCL_SH="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
    ITCL_SH="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
fi
fi
#--------------------------------------------------------------------
#--------------------------------------------------------------------
#   The statements below define a collection of symbols related to
#   The statements below define a collection of symbols related to
#   building libitcl as a shared library instead of a static library.
#   building libitcl as a shared library instead of a static library.
#--------------------------------------------------------------------
#--------------------------------------------------------------------
AC_ARG_ENABLE(shared,
AC_ARG_ENABLE(shared,
    [  --enable-shared         build libitcl as a shared library],
    [  --enable-shared         build libitcl as a shared library],
    [ok=$enableval], [ok=no])
    [ok=$enableval], [ok=no])
if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
    ITCL_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
    ITCL_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
    eval "ITCL_LIB_FILE=libitcl${VERSION}${SHLIB_SUFFIX}"
    eval "ITCL_LIB_FILE=libitcl${VERSION}${SHLIB_SUFFIX}"
    ITCL_PKG_FILE="[[file join [file dirname \$dir] ${ITCL_LIB_FILE}]]"
    ITCL_PKG_FILE="[[file join [file dirname \$dir] ${ITCL_LIB_FILE}]]"
    MAKE_LIB="\${SHLIB_LD} -o ${ITCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"
    MAKE_LIB="\${SHLIB_LD} -o ${ITCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"
    RANLIB=":"
    RANLIB=":"
else
else
    ITCL_SHLIB_CFLAGS=""
    ITCL_SHLIB_CFLAGS=""
    eval "ITCL_LIB_FILE=libitcl${VERSION}.a"
    eval "ITCL_LIB_FILE=libitcl${VERSION}.a"
    ITCL_PKG_FILE=""
    ITCL_PKG_FILE=""
    MAKE_LIB="ar cr ${ITCL_LIB_FILE} \${OBJS}"
    MAKE_LIB="ar cr ${ITCL_LIB_FILE} \${OBJS}"
fi
fi
# Note:  in the following variable, it's important to use the absolute
# Note:  in the following variable, it's important to use the absolute
# path name of the Tcl directory rather than "..":  this is because
# path name of the Tcl directory rather than "..":  this is because
# AIX remembers this path and will attempt to use it at run-time to look
# AIX remembers this path and will attempt to use it at run-time to look
# up the Tcl library.
# up the Tcl library.
if test "$GCC" = yes; then
if test "$GCC" = yes; then
    ITCL_BUILD_LIB_SPEC="-L`pwd` -l${ITCLLIBSPEC}"
    ITCL_BUILD_LIB_SPEC="-L`pwd` -l${ITCLLIBSPEC}"
    ITCL_LIB_SPEC="-L${exec_prefix}/lib/itcl -l{ITCLLIBSPEC}"
    ITCL_LIB_SPEC="-L${exec_prefix}/lib/itcl -l{ITCLLIBSPEC}"
    ITCL_LIB_FULL_PATH="`pwd`/${ITCLLIB}"
    ITCL_LIB_FULL_PATH="`pwd`/${ITCLLIB}"
else
else
    tmp="`pwd`/${ITCLLIB}"
    tmp="`pwd`/${ITCLLIB}"
    tmp2="`cygpath --windows $tmp`"
    tmp2="`cygpath --windows $tmp`"
    ITCL_BUILD_LIB_SPEC="`echo $tmp2 | sed -e s#\\\\\\\\#/#g`"
    ITCL_BUILD_LIB_SPEC="`echo $tmp2 | sed -e s#\\\\\\\\#/#g`"
    ITCL_LIB_FULL_PATH=${ITCL_BUILD_LIB_SPEC}
    ITCL_LIB_FULL_PATH=${ITCL_BUILD_LIB_SPEC}
    tmp="${exec_prefix}/lib/itcl/${ITCLLIB}"
    tmp="${exec_prefix}/lib/itcl/${ITCLLIB}"
    tmp2="`cygpath --windows $tmp`"
    tmp2="`cygpath --windows $tmp`"
    ITCL_LIB_SPEC="`echo $tmp2 | sed -e s#\\\\\\\\#/#g`"
    ITCL_LIB_SPEC="`echo $tmp2 | sed -e s#\\\\\\\\#/#g`"
fi
fi
#-------------------------------------------------------------------
#-------------------------------------------------------------------
# Set up the libraries to link with.
# Set up the libraries to link with.
#-------------------------------------------------------------------
#-------------------------------------------------------------------
if test "$GCC" = yes; then
if test "$GCC" = yes; then
    BASELIBS="-lkernel32 $(optlibs) -ladvapi32 -luser32"
    BASELIBS="-lkernel32 $(optlibs) -ladvapi32 -luser32"
    WINLIBS="-lgdi32 -lcomdlg32 -lwinspool"
    WINLIBS="-lgdi32 -lcomdlg32 -lwinspool"
    LIBCDLL=
    LIBCDLL=
else
else
    BASELIBS="kernel32.lib advapi32.lib user32.lib"
    BASELIBS="kernel32.lib advapi32.lib user32.lib"
    WINLIBS="gdi32.lib comdlg32.lib winspool.lib"
    WINLIBS="gdi32.lib comdlg32.lib winspool.lib"
    LIBCDLL="msvcrt.lib oldnames.lib"
    LIBCDLL="msvcrt.lib oldnames.lib"
fi
fi
AC_SUBST(CFLAGS)
AC_SUBST(CFLAGS)
AC_SUBST(DL_LIBS)
AC_SUBST(DL_LIBS)
AC_SUBST(LD_FLAGS)
AC_SUBST(LD_FLAGS)
AC_SUBST(MATH_LIBS)
AC_SUBST(MATH_LIBS)
AC_SUBST(MAKE_LIB)
AC_SUBST(MAKE_LIB)
AC_SUBST(SHLIB_CFLAGS)
AC_SUBST(SHLIB_CFLAGS)
AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(SHLIB_VERSION)
AC_SUBST(SHLIB_VERSION)
AC_SUBST(TCL_BIN_DIR)
AC_SUBST(TCL_BIN_DIR)
AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TCL_VERSION)
AC_SUBST(TCL_VERSION)
AC_SUBST(TCL_LIB_FILE)
AC_SUBST(TCL_LIB_FILE)
AC_SUBST(TCL_LIB_FULL_PATH)
AC_SUBST(TCL_LIB_FULL_PATH)
AC_SUBST(ITCL_BUILD_LIB_SPEC)
AC_SUBST(ITCL_BUILD_LIB_SPEC)
AC_SUBST(ITCL_LD_SEARCH_FLAGS)
AC_SUBST(ITCL_LD_SEARCH_FLAGS)
AC_SUBST(ITCL_LIB_FILE)
AC_SUBST(ITCL_LIB_FILE)
AC_SUBST(ITCL_LIB_FULL_PATH)
AC_SUBST(ITCL_LIB_FULL_PATH)
AC_SUBST(ITCL_LIB_SPEC)
AC_SUBST(ITCL_LIB_SPEC)
AC_SUBST(ITCL_MAJOR_VERSION)
AC_SUBST(ITCL_MAJOR_VERSION)
AC_SUBST(ITCL_MINOR_VERSION)
AC_SUBST(ITCL_MINOR_VERSION)
AC_SUBST(ITCL_PKG_FILE)
AC_SUBST(ITCL_PKG_FILE)
AC_SUBST(ITCL_SHLIB_CFLAGS)
AC_SUBST(ITCL_SHLIB_CFLAGS)
AC_SUBST(ITCL_SRC_DIR)
AC_SUBST(ITCL_SRC_DIR)
AC_SUBST(ITCL_VERSION)
AC_SUBST(ITCL_VERSION)
AC_SUBST(CYGITCLLIB)
AC_SUBST(CYGITCLLIB)
AC_SUBST(CYGITCLDLL)
AC_SUBST(CYGITCLDLL)
AC_SUBST(CYGITCLSH)
AC_SUBST(CYGITCLSH)
AC_SUBST(CYGITCLDEF)
AC_SUBST(CYGITCLDEF)
AC_SUBST(CYGITCLTEST)
AC_SUBST(CYGITCLTEST)
AC_SUBST(CYGIMPORTLIB)
AC_SUBST(CYGIMPORTLIB)
AC_SUBST(CYGITCLRES)
AC_SUBST(CYGITCLRES)
AC_SUBST(CYGITCLSHRES)
AC_SUBST(CYGITCLSHRES)
AC_SUBST(SNITCLLIB)
AC_SUBST(SNITCLLIB)
AC_SUBST(SNITCLDLL)
AC_SUBST(SNITCLDLL)
AC_SUBST(SNITCLSH)
AC_SUBST(SNITCLSH)
AC_SUBST(SNITCLDEF)
AC_SUBST(SNITCLDEF)
AC_SUBST(SNITCLTEST)
AC_SUBST(SNITCLTEST)
AC_SUBST(SNIMPORTLIB)
AC_SUBST(SNIMPORTLIB)
AC_SUBST(SNITCLRES)
AC_SUBST(SNITCLRES)
AC_SUBST(SNITCLSHRES)
AC_SUBST(SNITCLSHRES)
AC_SUBST(ITCLLIB)
AC_SUBST(ITCLLIB)
AC_SUBST(ITCLDLL)
AC_SUBST(ITCLDLL)
AC_SUBST(ITCLSH)
AC_SUBST(ITCLSH)
AC_SUBST(ITCLDEF)
AC_SUBST(ITCLDEF)
AC_SUBST(ITCLTEST)
AC_SUBST(ITCLTEST)
AC_SUBST(ITCLIMPORTLIB)
AC_SUBST(ITCLIMPORTLIB)
AC_SUBST(ITCLRES)
AC_SUBST(ITCLRES)
AC_SUBST(ITCL_SH)
AC_SUBST(ITCL_SH)
AC_SUBST(BASELIBS)
AC_SUBST(BASELIBS)
AC_SUBST(WINLIBS)
AC_SUBST(WINLIBS)
AC_SUBST(LIBCDLL)
AC_SUBST(LIBCDLL)
AC_OUTPUT(Makefile ../unix/pkgIndex.tcl ../itclConfig.sh)
AC_OUTPUT(Makefile ../unix/pkgIndex.tcl ../itclConfig.sh)
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.