AC_SUBST(CC)
])
-dnl ====================================================================
-dnl Find the HAL library. HAL is the BSP for ECC.
-AC_DEFUN(CYG_AC_PATH_HAL, [
-AC_MSG_CHECKING(for the HAL source files)
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-AC_CACHE_VAL(ac_cv_c_haldir,[
-dnl We have the translate the target triplet to the directory name
-dnl cause they unfortunately don't match.
-case ${target_cpu} in
- powerpc*) cpudir=powerpc ;;
- mn10300*) cpudir=panx ;;
- mips*) cpudir=mips ;;
- *) cpudir=none ;;
-esac
-for i in $dirlist; do
- if test -f "$srcdir/$i/hal/${cpudir}/arch/current/include/basetype.h" ; then
- ac_cv_c_haldir=`(cd $srcdir/$i/hal/${cpudir}/arch/current/; pwd)`
- fi
-done
-])
-if test x"${ac_cv_c_haldir}" != x; then
- HALDIR="${ac_cv_c_haldir}"
- AC_MSG_RESULT(${ac_cv_c_haldir})
-else
- AC_MSG_RESULT(none)
-fi
-AC_SUBST(HALDIR)
-])
-
-dnl ====================================================================
-dnl Find the ECC kernel headers.
-AC_DEFUN(CYG_AC_PATH_KERNEL, [
-AC_MSG_CHECKING(for the kernel header files in the source tree)
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-AC_CACHE_VAL(ac_cv_c_kernel,[
-for i in $dirlist; do
- if test -f "$srcdir/$i/kernel/current/include/kernel.hxx" ; then
- ac_cv_c_kernel=`(cd $srcdir/$i/kernel/current/include; pwd)`
- fi
-done
-])
-if test x"${ac_cv_c_kernel}" != x; then
- KERNELHDIR="-I${ac_cv_c_kernel}"
- AC_MSG_RESULT(${ac_cv_c_kernel})
-else
- AC_MSG_RESULT(none)
-fi
-AC_MSG_CHECKING(for the kernel library in the build tree)
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-AC_CACHE_VAL(ac_cv_c_klib,[
-for i in $dirlist; do
- if test -f "$i/kernel/current/src/Makefile" ; then
- ac_cv_c_klib=`(cd $i/kernel/current/src; pwd)`
- fi
-done
-])
-if test x"${ac_cv_c_klib}" != x; then
- KERNELLIB="-L${ac_cv_c_klib}"
- AC_MSG_RESULT(${ac_cv_c_klib})
-else
- AC_MSG_RESULT(none)
-fi
-AC_SUBST(KERNELHDIR)
-AC_SUBST(KERNELLIB)
-])
-
-dnl ====================================================================
-dnl Find the ECC kernel's config file. This config.h is not produced
-dnl by autoconf, but is handcrafted.
-AC_DEFUN(CYG_AC_PATH_CONFIG, [
-AC_MSG_CHECKING(for the kernel's config.h header files in the source tree)
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-AC_CACHE_VAL(ac_cv_c_configh,[
-for i in $dirlist; do
- if test -f "$srcdir/$i/kernel/current/src/devo/config.h" ; then
- ac_cv_c_configh=`(cd $srcdir/$i/kernel/current/src/devo; pwd)`
- fi
-done
-])
-if test x"${ac_cv_c_configh}" != x; then
- CONFIG_H="-I${ac_cv_c_configh}"
- AC_MSG_RESULT(${ac_cv_c_configh})
-else
- AC_MSG_RESULT(none)
-fi
-AC_SUBST(CONFIG_H)
-])
-
dnl ====================================================================
dnl Find the BFD library in the build tree. This is used to access and
dnl manipulate object or executable files.
AC_SUBST(ILUTOP)
])
-dnl ====================================================================
-dnl Find the target manager client side headers and library.
-AC_DEFUN(CYG_AC_PATH_TMGR, [
-AC_MSG_CHECKING(for Target Manager client headers in the source tree)
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.. "
-TMGRHDIR=
-TMGRLIB=
-AC_CACHE_VAL(ac_cv_c_tmgrh,[
-for i in $dirlist; do
- if test -f "${srcdir}/$i/ecc/ecc/infra/targ_mgr/current/host/targ_mgr/src/targcli.h" ; then
- ac_cv_c_tmgrh=`(cd ${srcdir}/$i/ecc/ecc/infra/targ_mgr/current/host/targ_mgr/src/; pwd)`;
- fi
-done
-])
-if test x"${ac_cv_c_tmgrh}" != x; then
- TMGRHDIR="-I${ac_cv_c_tmgrh}"
- AC_MSG_RESULT(${ac_cv_c_tmgrh})
-else
- AC_MSG_RESULT(none)
-fi
-
-AC_MSG_CHECKING(for Target Manager client headers in the build tree)
-AC_CACHE_VAL(ac_cv_c_tmgrh2,[
-for i in $dirlist; do
- if test -f "$i/ecc/ecc/infra/targ_mgr/current/host/targ_mgr/src/Makefile" ; then
- ac_cv_c_tmgrh2=`(cd $i/ecc/ecc/infra/targ_mgr/current/host/targ_mgr/src/; pwd)`;
- fi
-done
-])
-if test x"${ac_cv_c_tmgrh2}" != x; then
- TMGRHDIR="${TMGRHDIR} -I${ac_cv_c_tmgrh2}"
- AC_MSG_RESULT(${ac_cv_c_tmgrh2})
-else
- AC_MSG_RESULT(none)
-fi
-
-if test x"${ac_cv_c_tmgrh}" = x -a x"${ac_cv_c_tmgrh2}" = x; then
- TMGRHDIR="# no Target Manager client headers found"
-fi
-
-AC_MSG_CHECKING(for Target Manager client library)
-AC_CACHE_VAL(ac_cv_c_tmgrlib,[
-if test x"${ac_cv_c_tmgrlib}" = x ; then
- for i in $dirlist; do
- if test -f "$i/ecc/ecc/infra/targ_mgr/current/host/targ_mgr/src/Makefile" ; then
- # We have to add .libs on the end cause the tmgr uses libtool,
- # and GDB doesn't.
- ac_cv_c_tmgrlib=`(cd $i/ecc/ecc/infra/targ_mgr/current/host/targ_mgr/src/; pwd)`
- # we have to do this, cause libtool hasn't built the lib
- # library yet.
- ac_cv_c_tmgrlib="${ac_cv_c_tmgrlib}/.libs"
- break
- fi
- done
-fi])
-
-if test x"${ac_cv_c_tmgrlib}" != x ; then
- TMGRLIB="-L${ac_cv_c_tmgrlib}"
- AC_MSG_RESULT(${ac_cv_c_tmgrlib})
-else
- AC_MSG_RESULT(none)
-fi
-AC_SUBST(TMGRHDIR)
-AC_SUBST(TMGRLIB)
-])
-
dnl ====================================================================
dnl This defines the byte order for the host. We can't use
dnl AC_C_BIGENDIAN, cause we want to create a config file and
if test x"${ac_cv_c_tclh}" != x ; then
no_tcl=""
if test x"${ac_cv_c_tclh}" != x"installed" ; then
+ if test x"${CC}" = xcl ; then
+ tmp="`cygpath --windows ${ac_cv_c_tclh}`"
+ ac_cv_c_tclh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
+ fi
AC_MSG_RESULT(${ac_cv_c_tclh})
TCLHDIR="-I${ac_cv_c_tclh}"
fi
AC_SUBST(TCL_DEFS)
dnl not used, don't export to save symbols
-dnl AC_SUBST(TCL_LIB_FILE)
- AC_SUBST(TCL_LIBS)
+ AC_SUBST(TCL_LIB_FILE)
+ AC_SUBST(TCL_LIB_FULL_PATH)
+ AC_SUBST(TCL_LIBS)
dnl not used, don't export to save symbols
dnl AC_SUBST(TCL_PREFIX)
+ AC_SUBST(TCL_CFLAGS)
+
dnl not used, don't export to save symbols
dnl AC_SUBST(TCL_EXEC_PREFIX)
if test x"${ac_cv_c_tkh}" != x ; then
no_tk=""
if test x"${ac_cv_c_tkh}" != x"installed" ; then
+ if test x"${CC}" = xcl ; then
+ tmp="`cygpath --windows ${ac_cv_c_tkh}`"
+ ac_cv_c_tkh="`echo $tmp | sed -e s#\\\\\\\\#/#g`"
+ fi
AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
TKHDIR="-I${ac_cv_c_tkh}"
fi
AC_SUBST(TK_DEFS)
dnl not used, don't export to save symbols
-dnl AC_SUBST(TK_LIB_FILE)
-
+ AC_SUBST(TK_LIB_FILE)
+ AC_SUBST(TK_LIB_FULL_PATH)
AC_SUBST(TK_LIBS)
dnl not used, don't export to save symbols
dnl AC_SUBST(TK_PREFIX)
AC_SUBST(TIXHDIR)
])
+AC_DEFUN(CYG_AC_PATH_TIXCONFIG, [
+#
+# Ok, lets find the tix configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-tixconfig
+#
-dnl Ok, lets find the tix library
-dnl First, look for one uninstalled.
-dnl the alternative search directory is invoked by --with-tixlib
-AC_DEFUN(CYG_AC_PATH_TIXLIB, [
-dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
-if test x"${no_tcl}" = x; then
- dnl we reset no_tix incase something fails here
- no_tix=true
- AC_ARG_WITH(tixlib,
- [ --with-tixlib directory where the tix library is],
- with_tixlib=${withval})
- AC_MSG_CHECKING([for Tix library])
- AC_CACHE_VAL(ac_cv_c_tixlib,[
- dnl First check to see if --with-tixlib was specified.
- if test x"${with_tixlib}" != x ; then
- if test -f "${with_tixlib}/libtix${TCL_SHARED_LIB_SUFFIX}" ; then
- ac_cv_c_tixlib=`(cd ${with_tixlib}; pwd)`/libtix${TCL_SHARED_LIB_SUFFIX}
- else
- if test -f "${with_tixlib}/libtix${TCL_UNSHARED_LIB_SUFFIX}"; then
- ac_cv_c_tixlib=`(cd ${with_tixlib}; pwd)`/libtix${TCL_UNSHARED_LIB_SUFFIX}
- fi
- fi
+if test x"${no_tix}" = x ; then
+ # we reset no_tix in case something fails here
+ no_tix=true
+ AC_ARG_WITH(tixconfig, [ --with-tixconfig directory containing tix configuration (tixConfig.sh)],
+ with_tixconfig=${withval})
+ AC_MSG_CHECKING([for Tix configuration])
+ AC_CACHE_VAL(ac_cv_c_tixconfig,[
+
+ # First check to see if --with-tixconfig was specified.
+ if test x"${with_tixconfig}" != x ; then
+ if test -f "${with_tixconfig}/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh])
fi
+ fi
- dnl then check for a Tix library. Since these are uninstalled,
- if test x"${ac_cv_c_tixlib}" = x ; then
- dnl find the top level Tix build directory
- for i in ${dirlist}; do
- if test -n "`ls -dr $i/tix* 2>/dev/null`" ; then
- tixpath="$i/tix/unix/tk${TK_VERSION}"
- break
- fi
- done
- if test x"${tixpath}" != x; then
- tixversion=`grep "^TIX_VERSION" ${tixpath}/Makefile | sed -e 's:TIX_VERSION = ::'`
- if test -f "${tixpath}/libtix${tixversion}.${TCL_VERSION}${TCL_SHLIB_SUFFIX}" ; then
- ac_cv_c_tixlib=`(cd $tixpath; pwd)`/libtix${tixversion}.${TCL_VERSION}${TCL_SHLIB_SUFFIX}
- else
- if test -f "${tixpath}/libtix${tixversion}.${TCL_VERSION}.a" ; then
- ac_cv_c_tixlib=`(cd ${tixpath}; pwd)`/libtix${tixversion}.${TCL_VERSION}.a
- fi
- fi
- fi
+ # then check for a private Tix library
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ../tix \
+ `ls -dr ../tix[[4]]* 2>/dev/null` \
+ ../../tix \
+ `ls -dr ../../tix[[4]]* 2>/dev/null` \
+ ../../../tix \
+ `ls -dr ../../../tix[[4]]* 2>/dev/null` ; do
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tix \
+ `ls -dr ${srcdir}/../tix[[4-9]]* 2>/dev/null` ; do
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ TIXCONFIG="# no Tix configs found"
+ AC_MSG_WARN(Can't find Tix configuration definitions)
+ else
+ no_tix=
+ TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
+ AC_MSG_RESULT(found $TIXCONFIG)
+ fi
+fi
+
+])
+
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_TIXCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_TIXCONFIG, [
+ if test -f "$TIXCONFIG" ; then
+ . $TIXCONFIG
fi
- dnl see if one is conveniently installed with the compiler
- if test x"${ac_cv_c_tixlib}" = x ; then
- dnl Get the path to the compiler
- ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
-changequote(,)
- for i in `ls -dr $ccpath/libtix[0-9]* 2>/dev/null ` ; do
-changequote([,])
- if test -f $i ; then
- ac_cv_c_tixlib=$i
- break
- fi
- done
+ AC_SUBST(TIX_BUILD_LIB_SPEC)
+ AC_SUBST(TIX_LIB_FULL_PATH)
+])
+
+AC_DEFUN(CYG_AC_PATH_ITCLCONFIG, [
+#
+# Ok, lets find the itcl configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itclconfig
+#
+
+if test x"${no_itcl}" = x ; then
+ # we reset no_itcl in case something fails here
+ no_itcl=true
+ AC_ARG_WITH(itclconfig, [ --with-itclconfig directory containing itcl configuration (itclConfig.sh)],
+ with_itclconfig=${withval})
+ AC_MSG_CHECKING([for Itcl configuration])
+ AC_CACHE_VAL(ac_cv_c_itclconfig,[
+
+ # First check to see if --with-itclconfig was specified.
+ if test x"${with_itclconfig}" != x ; then
+ if test -f "${with_itclconfig}/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh])
fi
- ])
- if test x"${ac_cv_c_tixlib}" = x ; then
- TK_BUILD_LIB_SPEC=""
- AC_MSG_WARN(Can't find Tix library)
+ fi
+
+ # then check for a private itcl library
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in \
+ ../itcl/itcl \
+ `ls -dr ../itcl/itcl[[3]]* 2>/dev/null` \
+ ../../itcl/itcl \
+ `ls -dr ../../itcl/itcl[[3]]* 2>/dev/null` \
+ ../../../itcl/itcl \
+ `ls -dr ../../../itcl/itcl[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../itcl/itcl \
+ `ls -dr ${srcdir}/../itcl/itcl[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itcl/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_itclconfig}" = x ; then
+ ITCLCONFIG="# no itcl configs found"
+ AC_MSG_WARN(Can't find itcl configuration definitions)
+ else
+ no_itcl=
+ ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
+ AC_MSG_RESULT(found $ITCLCONFIG)
+ fi
+fi
+
+])
+
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_ITCLCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_ITCLCONFIG, [
+ if test -f "$ITCLCONFIG" ; then
+ . $ITCLCONFIG
+ fi
+
+ AC_SUBST(ITCL_BUILD_LIB_SPEC)
+ AC_SUBST(ITCL_SH)
+ AC_SUBST(ITCL_LIB_FILE)
+ AC_SUBST(ITCL_LIB_FULL_PATH)
+
+])
+
+
+AC_DEFUN(CYG_AC_PATH_ITKCONFIG, [
+#
+# Ok, lets find the itk configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itkconfig
+#
+
+if test x"${no_itk}" = x ; then
+ # we reset no_itk in case something fails here
+ no_itk=true
+ AC_ARG_WITH(itkconfig, [ --with-itkconfig directory containing itk configuration (itkConfig.sh)],
+ with_itkconfig=${withval})
+ AC_MSG_CHECKING([for Itk configuration])
+ AC_CACHE_VAL(ac_cv_c_itkconfig,[
+
+ # First check to see if --with-itkconfig was specified.
+ if test x"${with_itkconfig}" != x ; then
+ if test -f "${with_itkconfig}/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
else
-changequote(,)
- libname=`echo "${ac_cv_c_tixlib}" | sed -e 's:.*tk[0-9\.]*/lib::' -e 's:.*lib/lib::' -e 's:\.a::'`
-changequote([,])
- if test x"${ccpath}" != x ; then
- TIX_BUILD_LIB_SPEC="-l${libname}"
- else
- libpath=`echo "${ac_cv_c_tixlib}" | sed -e 's:libtix.*::'`
- TIX_BUILD_LIB_SPEC="-L${libpath} -l${libname}"
- fi
- AC_MSG_RESULT(${ac_cv_c_tixlib})
- no_tix=""
+ AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh])
fi
+ fi
+
+ # then check for a private itk library
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in \
+ ../itcl/itk \
+ `ls -dr ../itcl/itk[[3]]* 2>/dev/null` \
+ ../../itcl/itk \
+ `ls -dr ../../itcl/itk[[3]]* 2>/dev/null` \
+ ../../../itcl/itk \
+ `ls -dr ../../../itcl/itk[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few common install locations
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
+ if test -f "$i/itcl/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../itcl/itk \
+ `ls -dr ${srcdir}/../itcl/itk[[3]]* 2>/dev/null` ; do
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_itkconfig}" = x ; then
+ ITCLCONFIG="# no itk configs found"
+ AC_MSG_WARN(Can't find itk configuration definitions)
+ else
+ no_itk=
+ ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
+ AC_MSG_RESULT(found $ITKCONFIG)
+ fi
fi
-AC_PROVIDE([$0])
-AC_SUBST(TIXLIB)
-AC_SUBST(TIX_VERSION)
-AC_SUBST(TIX_BUILD_LIB_SPEC)
])
+# Defined as a separate macro so we don't have to cache the values
+# from PATH_ITKCONFIG (because this can also be cached).
+AC_DEFUN(CYG_AC_LOAD_ITKCONFIG, [
+ if test -f "$ITKCONFIG" ; then
+ . $ITKCONFIG
+ fi
+
+ AC_SUBST(ITK_BUILD_LIB_SPEC)
+ AC_SUBST(ITK_LIB_FILE)
+ AC_SUBST(ITK_LIB_FULL_PATH)
+])
+
+
dnl ====================================================================
dnl Ok, lets find the libgui source trees so we can use the headers
dnl the alternative search directory is involked by --with-libguiinclude