AC_DEFUN(CYG_AC_PROG_CXX_CROSS,
[AC_BEFORE([$0], [AC_PROG_CXXCPP])
AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
CYG_AC_PROG_GXX_WORKS
if test $ac_cv_prog_gxx = yes; then
GXX=yes
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
AC_PROG_CXX_G
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-O2"
fi
else
GXX=
test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
fi
])
AC_DEFUN(CYG_AC_PROG_GXX_WORKS,
[AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually works])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
if test x"${CXX}" = xc++ ; then
CXX=`echo gcc | sed -e "${program_transform_name}"`
fi
libgccpath=`${CXX} --print-libgcc`
if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
fi
if test x"${ac_cv_prog_gxx}" = xyes ; then
gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'`
if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then
gccfiles=yes
else
gccfiles=no
fi
gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib
if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then
gcclibs=yes
else
gcclibs=no
fi
fi
if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then
ac_cv_prog_cxx_works=no
AC_MSG_ERROR(${CXX} is a non-working cross compiler)
else
ac_cv_prog_cxx_works=yes
fi
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_prog_cxx_works)
if test x"$ac_cv_prog_cxx_works" = xno; then
AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.])
fi
AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler])
AC_MSG_RESULT($ac_cv_prog_cxx_cross)
cross_compiling=$ac_cv_prog_cxx_cross
AC_SUBST(CXX)
])
AC_DEFUN(CYG_AC_PROG_CC_CROSS,
[AC_BEFORE([$0], [AC_PROG_CCPP])
AC_CHECK_PROGS(CC, cc, gcc)
CYG_AC_PROG_GCC_WORKS
if test $ac_cv_prog_gcc = yes; then
GCC=yes
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
AC_PROG_CC_G
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-O2"
fi
else
GXX=
test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
])
AC_DEFUN(CYG_AC_PROG_GCC_WORKS,
[AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) actually works])
AC_LANG_SAVE
AC_LANG_C
if test x"${CC}" = xcc ; then
CC=`echo gcc | sed -e "${program_transform_name}"`
fi
libgccpath=`${CC} --print-libgcc`
if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
if test x"${ac_cv_prog_gcc}" = xyes ; then
gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'`
if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then
gccfiles=yes
else
gccfiles=no
fi
gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib
if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then
gcclibs=yes
else
gcclibs=no
fi
fi
if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then
ac_cv_prog_cc_works=no
AC_MSG_ERROR(${CC} is a non-working cross compiler)
else
ac_cv_prog_cc_works=yes
fi
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_prog_cc_works)
if test x"$ac_cv_prog_cc_works" = xno; then
AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.])
fi
AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
AC_MSG_RESULT($ac_cv_prog_cc_cross)
cross_compiling=$ac_cv_prog_cc_cross
AC_SUBST(CC)
])
AC_DEFUN(CYG_AC_PATH_BFD, [
AC_MSG_CHECKING(for the bfd header in the build tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_bfdh,[
for i in $dirlist; do
if test -f "$i/bfd/bfd.h" ; then
ac_cv_c_bfdh=`(cd $i/bfd; ${PWDCMD-pwd})`
break
fi
done
])
if test x"${ac_cv_c_bfdh}" != x; then
BFDHDIR="-I${ac_cv_c_bfdh}"
AC_MSG_RESULT(${ac_cv_c_bfdh})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(BFDHDIR)
AC_MSG_CHECKING(for the bfd library in the build tree)
AC_CACHE_VAL(ac_cv_c_bfdlib,[
for i in $dirlist; do
if test -f "$i/bfd/Makefile" ; then
ac_cv_c_bfdlib=`(cd $i/bfd; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_bfdlib}" != x; then
BFDLIB="-L${ac_cv_c_bfdlib} -L${ac_cv_c_bfdlib}/.libs"
AC_MSG_RESULT(${ac_cv_c_bfdlib})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(BFDLIB)
])
AC_DEFUN(CYG_AC_PATH_LIBERTY, [
AC_MSG_CHECKING(for the liberty library in the build tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_liberty,[
for i in $dirlist; do
if test -f "$i/libiberty/Makefile" ; then
ac_cv_c_liberty=`(cd $i/libiberty; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_liberty}" != x; then
LIBERTY="-L${ac_cv_c_liberty}"
AC_MSG_RESULT(${ac_cv_c_liberty})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(LIBERTY)
])
AC_DEFUN(CYG_AC_PATH_OPCODES, [
AC_MSG_CHECKING(for the opcodes library in the build tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_opc,[
for i in $dirlist; do
if test -f "$i/opcodes/Makefile" ; then
ac_cv_c_opc=`(cd $i/opcodes; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_opc}" != x; then
OPCODESLIB="-L${ac_cv_c_opc}"
AC_MSG_RESULT(${ac_cv_c_opc})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(OPCODESLIB)
])
AC_DEFUN(CYG_AC_PATH_DEJAGNU, [
AC_MSG_CHECKING(for the testing support files in the source tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_dejagnu,[
for i in $dirlist; do
if test -f "$srcdir/$i/ecc/ecc/infra/testlib/current/include/dejagnu.h" ; then
ac_cv_c_dejagnu=`(cd $srcdir/$i/ecc/ecc/infra/testlib/current/include; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_dejagnu}" != x; then
DEJAGNUHDIR="-I${ac_cv_c_dejagnu}"
AC_MSG_RESULT(${ac_cv_c_dejagnu})
else
AC_MSG_RESULT(none)
fi
AC_CACHE_VAL(ac_cv_c_dejagnulib,[
for i in $dirlist; do
if test -f "$srcdir/$i/infra/testlib/current/lib/hostutil.exp" ; then
ac_cv_c_dejagnulib=`(cd $srcdir/$i/infra/testlib/current/lib; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_dejagnulib}" != x; then
DEJAGNULIB="${ac_cv_c_dejagnulib}"
else
DEJAGNULIB=""
fi
AC_MSG_CHECKING(for runtest in the source tree)
AC_CACHE_VAL(ac_cv_c_runtest,[
for i in $dirlist; do
if test -f "$srcdir/$i/dejagnu/runtest" ; then
ac_cv_c_runtest=`(cd $srcdir/$i/dejagnu; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_runtest}" != x; then
RUNTESTDIR="${ac_cv_c_runtest}"
AC_MSG_RESULT(${ac_cv_c_runtest})
else
RUNTESTDIR=""
AC_MSG_RESULT(none)
fi
AC_SUBST(RUNTESTDIR)
AC_SUBST(DEJAGNULIB)
AC_SUBST(DEJAGNUHDIR)
])
AC_DEFUN(CYG_AC_PATH_INTL, [
AC_MSG_CHECKING(for the intl header in the build tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_intlh,[
for i in $dirlist; do
if test -f "$i/intl/libintl.h" ; then
ac_cv_c_intlh=`(cd $i/intl; ${PWDCMD-pwd})`
break
fi
done
])
if test x"${ac_cv_c_intlh}" != x; then
INTLHDIR="-I${ac_cv_c_intlh}"
AC_MSG_RESULT(${ac_cv_c_intlh})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(INTLHDIR)
AC_MSG_CHECKING(for the libintl library in the build tree)
AC_CACHE_VAL(ac_cv_c_intllib,[
for i in $dirlist; do
if test -f "$i/intl/Makefile" ; then
ac_cv_c_intllib=`(cd $i/intl; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_intllib}" != x; then
INTLLIB="-L${ac_cv_c_intllib} -lintl"
AC_MSG_RESULT(${ac_cv_c_intllib})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(INTLLIB)
])
AC_DEFUN(CYG_AC_PATH_SIM, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.. ../../../../../../../../../.."
case "$target_cpu" in
powerpc) target_dir=ppc ;;
sparc*) target_dir=erc32 ;;
mips*) target_dir=mips ;;
*) target_dir=$target_cpu ;;
esac
AC_MSG_CHECKING(for the simulator header file)
AC_CACHE_VAL(ac_cv_c_simh,[
for i in $dirlist; do
if test -f "${srcdir}/$i/include/remote-sim.h" ; then
ac_cv_c_simh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})`
break
fi
done
])
if test x"${ac_cv_c_simh}" != x; then
SIMHDIR="-I${ac_cv_c_simh}"
AC_MSG_RESULT(${ac_cv_c_simh})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(SIMHDIR)
AC_MSG_CHECKING(Whether this is a devo simulator )
AC_CACHE_VAL(ac_cv_c_simdevo,[
CPPFLAGS="$CPPFLAGS $SIMHDIR"
AC_EGREP_HEADER([SIM_DESC sim_open.*struct _bfd], remote-sim.h,
ac_cv_c_simdevo=yes,
ac_cv_c_simdevo=no)
])
if test x"$ac_cv_c_simdevo" = x"yes" ; then
AC_DEFINE(HAVE_DEVO_SIM)
fi
AC_MSG_RESULT(${ac_cv_c_simdevo})
AC_SUBST(HAVE_DEVO_SIM)
AC_MSG_CHECKING(for the simulator library)
AC_CACHE_VAL(ac_cv_c_simlib,[
for i in $dirlist; do
if test -f "$i/sim/$target_dir/Makefile" ; then
ac_cv_c_simlib=`(cd $i/sim/$target_dir; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_simlib}" != x; then
SIMLIB="-L${ac_cv_c_simlib}"
else
AC_MSG_RESULT(none)
CROSS_GCC=`echo gcc | sed -e "s/^/$target/"`
changequote(,)
gccpath=`${CROSS_GCC} --print-libgcc | sed -e 's:[a-z0-9A-Z\.\-]*/libgcc.a::' -e 's:lib/gcc-lib/::'`lib
changequote([,])
if test -f $gccpath/libsim.a -o -f $gccpath/libsim.so ; then
ac_cv_c_simlib="$gccpath/"
SIMLIB="-L${ac_cv_c_simlib}"
AC_MSG_RESULT(${ac_cv_c_simlib})
else
AM_CONDITIONAL(PSIM, test x$psim = xno)
SIMLIB=""
AC_MSG_RESULT(none)
fi
fi
AC_SUBST(SIMLIB)
])
AC_DEFUN(CYG_AC_PATH_LIBIBERTY, [
AC_MSG_CHECKING(for the libiberty library in the build tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_libib,[
for i in $dirlist; do
if test -f "$i/libiberty/Makefile" ; then
ac_cv_c_libib=`(cd $i/libiberty/; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_libib}" != x; then
LIBIBERTY="-L${ac_cv_c_libib}"
AC_MSG_RESULT(${ac_cv_c_libib})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(LIBIBERTY)
])
AC_DEFUN(CYG_AC_PATH_DEVO, [
AC_MSG_CHECKING(for devo headers in the source tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_devoh,[
for i in $dirlist; do
if test -f "${srcdir}/$i/include/remote-sim.h" ; then
ac_cv_c_devoh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_devoh}" != x; then
DEVOHDIR="-I${ac_cv_c_devoh}"
AC_MSG_RESULT(${ac_cv_c_devoh})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(DEVOHDIR)
])
AC_DEFUN(CYG_AC_PATH_IDE, [
AC_MSG_CHECKING(for IDE headers in the source tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
IDEHDIR=
IDELIB=
AC_CACHE_VAL(ac_cv_c_ideh,[
for i in $dirlist; do
if test -f "${srcdir}/$i/libide/src/event.h" ; then
ac_cv_c_ideh=`(cd ${srcdir}/$i/libide/src; ${PWDCMD-pwd})`;
fi
done
])
if test x"${ac_cv_c_ideh}" != x; then
IDEHDIR="-I${ac_cv_c_ideh}"
AC_MSG_RESULT(${ac_cv_c_ideh})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for LIBIDE TCL headers in the source tree)
AC_CACHE_VAL(ac_cv_c_idetclh,[
for i in $dirlist; do
if test -f "${srcdir}/$i/libidetcl/src/idetcl.h" ; then
ac_cv_c_idetclh=`(cd ${srcdir}/$i/libidetcl/src; ${PWDCMD-pwd})`;
fi
done
])
if test x"${ac_cv_c_idetclh}" != x; then
IDEHDIR="${IDEHDIR} -I${ac_cv_c_idetclh}"
AC_MSG_RESULT(${ac_cv_c_idetclh})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for IDE headers in the build tree)
AC_CACHE_VAL(ac_cv_c_ideh2,[
for i in $dirlist; do
if test -f "$i/libide/src/Makefile" ; then
ac_cv_c_ideh2=`(cd $i/libide/src; ${PWDCMD-pwd})`;
fi
done
])
if test x"${ac_cv_c_ideh2}" != x; then
IDEHDIR="${IDEHDIR} -I${ac_cv_c_ideh2}"
AC_MSG_RESULT(${ac_cv_c_ideh2})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for IDE library)
AC_CACHE_VAL(ac_cv_c_idelib,[
if test x"${ac_cv_c_idelib}" = x ; then
for i in $dirlist; do
if test -f "$i/libide/src/Makefile" ; then
ac_cv_c_idelib=`(cd $i/libide/src; ${PWDCMD-pwd})`
break
fi
done
fi])
if test x"${ac_cv_c_idelib}" != x ; then
IDELIB="-L${ac_cv_c_idelib}"
AC_MSG_RESULT(${ac_cv_c_idelib})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for IDE TCL library)
AC_CACHE_VAL(ac_cv_c_idetcllib,[
if test x"${ac_cv_c_idetcllib}" = x ; then
for i in $dirlist; do
if test -f "$i/libidetcl/src/Makefile" ; then
ac_cv_c_idetcllib=`(cd $i/libidetcl/src; ${PWDCMD-pwd})`
break
fi
done
fi
])
if test x"${ac_cv_c_idetcllib}" != x ; then
IDELIB="${IDELIB} -L${ac_cv_c_idetcllib}"
IDETCLLIB="-lidetcl"
AC_MSG_RESULT(${ac_cv_c_idetcllib})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(IDEHDIR)
AC_SUBST(IDELIB)
AC_SUBST(IDETCLLIB)
])
AC_DEFUN(CYG_AC_PATH_ILU, [
AC_MSG_CHECKING(for ILU kernel headers in the source tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_iluh,[
for i in $dirlist; do
if test -f "${srcdir}/$i/ilu/runtime/kernel/method.h" ; then
ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_iluh}" != x; then
ILUHDIR="-I${ac_cv_c_iluh}"
AC_MSG_RESULT(${ac_cv_c_iluh})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for ILU kernel headers in the build tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_CACHE_VAL(ac_cv_c_iluh5,[
for i in $dirlist; do
if test -f "$i/ilu/runtime/kernel/iluconf.h" ; then
ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_iluh5}" != x; then
ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh5}"
AC_MSG_RESULT(${ac_cv_c_iluh5})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for ILU C++ headers in the source tree)
AC_CACHE_VAL(ac_cv_c_iluh2,[
for i in $dirlist; do
if test -f "${srcdir}/$i/ilu/stubbers/cpp/resource.h" ; then
ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_iluh2}" != x; then
ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh2}"
AC_MSG_RESULT(${ac_cv_c_iluh2})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for ILU C headers)
AC_CACHE_VAL(ac_cv_c_iluh3,[
for i in $dirlist; do
if test -f "${srcdir}/$i/ilu/stubbers/c/resource.h" ; then
ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c ; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_iluh3}" != x; then
ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh3}"
AC_MSG_RESULT(${ac_cv_c_iluh3})
else
AC_MSG_RESULT(none)
fi
AC_MSG_CHECKING(for ILU C runtime headers)
AC_CACHE_VAL(ac_cv_c_iluh4,[
for i in $dirlist; do
if test -f "${srcdir}/$i/ilu/runtime/c/ilucstub.h" ; then
ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c ; ${PWDCMD-pwd})`
fi
done
])
if test x"${ac_cv_c_iluh4}" != x; then
ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh4}"
AC_MSG_RESULT(${ac_cv_c_iluh4})
else
AC_MSG_RESULT(none)
fi
AC_CACHE_VAL(ac_cv_c_ilupath,[
for i in $dirlist; do
if test -f "$i/ilu/Makefile" ; then
ac_cv_c_ilupath=`(cd $i/ilu; ${PWDCMD-pwd})`
break
fi
done
])
ILUTOP=${ac_cv_c_ilupath}
AC_MSG_CHECKING(for the ILU library in the build tree)
AC_CACHE_VAL(ac_cv_c_ilulib,[
if test -f "$ac_cv_c_ilupath/runtime/kernel/Makefile" ; then
ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; ${PWDCMD-pwd})`
AC_MSG_RESULT(found ${ac_cv_c_ilulib}/libilu.a)
else
AC_MSG_RESULT(no)
fi])
AC_MSG_CHECKING(for the ILU C++ bindings library in the build tree)
AC_CACHE_VAL(ac_cv_c_ilulib2,[
if test -f "$ac_cv_c_ilupath/runtime/cpp/Makefile" ; then
ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; ${PWDCMD-pwd})`
AC_MSG_RESULT(found ${ac_cv_c_ilulib2}/libilu-c++.a)
else
AC_MSG_RESULT(no)
fi])
AC_MSG_CHECKING(for the ILU C bindings library in the build tree)
AC_CACHE_VAL(ac_cv_c_ilulib3,[
if test -f "$ac_cv_c_ilupath/runtime/c/Makefile" ; then
ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; ${PWDCMD-pwd})`
AC_MSG_RESULT(found ${ac_cv_c_ilulib3}/libilu-c.a)
else
AC_MSG_RESULT(no)
fi])
AC_MSG_CHECKING(for the ILU Tk bindings library in the build tree)
AC_CACHE_VAL(ac_cv_c_ilulib4,[
if test -f "$ac_cv_c_ilupath/runtime/mainloop/Makefile" ; then
ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; ${PWDCMD-pwd})`
AC_MSG_RESULT(found ${ac_cv_c_ilulib4}/libilu-tk.a)
else
AC_MSG_RESULT(no)
fi])
if test x"${ac_cv_c_ilulib}" = x -a x"${ac_cv_c_ilulib2}" = x; then
ILUHDIR=""
fi
if test x"${ac_cv_c_ilulib}" != x -a x"${ac_cv_c_ilulib2}" != x; then
ILULIB="-L${ac_cv_c_ilulib} -L${ac_cv_c_ilulib2} -L${ac_cv_c_ilulib3} -L${ac_cv_c_ilulib4}"
else
ILULIB=""
fi
if test x"${ILULIB}" = x; then
AC_MSG_CHECKING(for ILU libraries installed with the compiler)
AC_CACHE_VAL(ac_cv_c_ilulib5,[
NATIVE_GCC=`echo gcc | sed -e "${program_transform_name}"`
dnl Get G++'s full path to it's libraries
ac_cv_c_ilulib5=`${NATIVE_GCC} --print-libgcc | sed -e 's:lib/gcc-lib/.*::'`lib
if test -f $ac_cv_c_ilulib5/libilu-c.a -o -f $ac_cv_c_ilulib5/libilu-c.so ; then
if test x"${ILUHDIR}" = x; then
ILUHDIR="-I${ac_cv_c_ilulib5}/../include"
fi
ILULIB="-L${ac_cv_c_ilulib5}"
AC_MSG_RESULT(${ac_cv_c_ilulib5})
else
ac_cv_c_ilulib=none
AC_MSG_RESULT(none)
fi
fi])
AC_SUBST(ILUHDIR)
AC_SUBST(ILULIB)
AC_SUBST(ILUTOP)
])
AC_DEFUN(CYG_AC_C_ENDIAN, [
AC_MSG_CHECKING(to see if this is a little endian host)
AC_CACHE_VAL(ac_cv_c_little_endian, [
ac_cv_c_little_endian=unknown
AC_TRY_COMPILE([ bogus endian macros
AC_TRY_COMPILE([ not big endian
])
if test ${ac_cv_c_little_endian} = unknown; then
old_cflags=$CFLAGS
CFLAGS=-g
AC_TRY_RUN([
main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
long l;
char c[sizeof (long)];
} u;
u.l = 1;
exit (u.c[0] == 1);
}],
ac_cv_c_little_endian=no,
ac_cv_c_little_endian=yes,[
case "${host}" in
changequote(,)
i[3456]86-*-*) ac_cv_c_little_endian=yes ;;
sparc*-*-*) ac_cv_c_little_endian=no ;;
changequote([,])
*) AC_MSG_WARN(Can't cross compile this test) ;;
esac])
CFLAGS=$old_cflags
fi])
if test x"${ac_cv_c_little_endian}" = xyes; then
AC_DEFINE(LITTLE_ENDIAN_HOST)
ENDIAN="CYG_LSBFIRST";
else
ENDIAN="CYG_MSBFIRST";
fi
AC_MSG_RESULT(${ac_cv_c_little_endian})
AC_SUBST(ENDIAN)
])
AC_DEFUN(CYG_AC_PATH_LIBGCC,
[AC_MSG_CHECKING([Looking for the path to libgcc.a])
AC_LANG_SAVE
AC_LANG_C
libgccpath=`${CC} --print-libgcc`
if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
if test x"${ac_cv_prog_gcc}" = xyes ; then
gccpath=`echo $libgccpath | sed -e 's:/libgcc.a::'`
LIBGCC="-L${gccpath}"
AC_MSG_RESULT(${gccpath})
else
LIBGCC=""
AC_MSG_ERROR(Not using gcc)
fi
AC_LANG_RESTORE
AC_SUBST(LIBGCC)
])
AC_DEFUN(CYG_AC_PATH_TCL, [
CYG_AC_PATH_TCLH
CYG_AC_PATH_TCLCONFIG
CYG_AC_LOAD_TCLCONFIG
])
AC_DEFUN(CYG_AC_PATH_TCLH, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
no_tcl=true
AC_MSG_CHECKING(for Tcl headers in the source tree)
AC_ARG_WITH(tclinclude, [ --with-tclinclude directory where tcl headers are], with_tclinclude=${withval})
AC_CACHE_VAL(ac_cv_c_tclh,[
if test x"${with_tclinclude}" != x ; then
if test -f ${with_tclinclude}/tcl.h ; then
ac_cv_c_tclh=`(cd ${with_tclinclude}; ${PWDCMD-pwd})`
elif test -f ${with_tclinclude}/generic/tcl.h ; then
ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_tclinclude} directory doesn't contain headers])
fi
fi
if test x"${ac_cv_c_tclconfig}" != x ; then
for i in $dirlist; do
if test -f $ac_cv_c_tclconfig/$i/generic/tcl.h ; then
ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/$i/generic; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tclh}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $srcdir/$i/tcl* 2>/dev/null`" ; then
tclpath=$srcdir/$i
break
fi
done
for i in `ls -dr $tclpath/tcl* 2>/dev/null ` ; do
if test -f $i/generic/tcl.h ; then
ac_cv_c_tclh=`(cd $i/generic; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tclh}" = x ; then
ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
if test -f $ccpath/tcl.h; then
ac_cv_c_tclh=$ccpath
fi
fi
if test x"${ac_cv_c_tclh}" = x ; then
AC_MSG_RESULT(none)
AC_CHECK_HEADER(tcl.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
else
AC_MSG_RESULT(${ac_cv_c_tclh})
fi
])
TCLHDIR=""
if test x"${ac_cv_c_tclh}" = x ; then
AC_MSG_ERROR([Can't find any Tcl headers])
fi
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 fi
AC_MSG_RESULT(${ac_cv_c_tclh})
TCLHDIR="-I${ac_cv_c_tclh}"
fi
fi
AC_SUBST(TCLHDIR)
])
AC_DEFUN(CYG_AC_PATH_TCLCONFIG, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
if test x"${no_tcl}" = x ; then
no_tcl=true
AC_ARG_WITH(tclconfig, [ --with-tclconfig directory containing tcl configuration (tclConfig.sh)],
with_tclconfig=${withval})
AC_MSG_CHECKING([for Tcl configuration script])
AC_CACHE_VAL(ac_cv_c_tclconfig,[
if test x"${with_tclconfig}" != x ; then
if test -f "${with_tclconfig}/tclConfig.sh" ; then
ac_cv_c_tclconfig=`(cd ${with_tclconfig}; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
fi
fi
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in $dirlist; do
if test -f $srcdir/$i/unix/tclConfig.sh ; then
ac_cv_c_tclconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})`
break
fi
if test -f $srcdir/$i/win/tclConfig.sh ; then
ac_cv_c_tclconfig=`(cd $srcdir/$i/win; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tclconfig}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $i/tcl* 2>/dev/null`" ; then
tclconfpath=$i
break
fi
done
for i in `ls -dr $tclconfpath/tcl* 2>/dev/null ` ; do
if test -f $i/unix/tclConfig.sh ; then
ac_cv_c_tclconfig=`(cd $i/unix; ${PWDCMD-pwd})`
break
fi
if test -f $i/win/tclConfig.sh ; then
ac_cv_c_tclconfig=`(cd $i/win; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tclconfig}" = x ; then
ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
if test -f $ccpath/tclConfig.sh; then
ac_cv_c_tclconfig=$ccpath
fi
fi
])
if test x"${ac_cv_c_tclconfig}" = x ; then
TCLCONFIG=""
AC_MSG_WARN(Can't find Tcl configuration definitions)
else
no_tcl=""
TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
AC_MSG_RESULT(${TCLCONFIG})
fi
fi
AC_SUBST(TCLCONFIG)
])
AC_DEFUN(CYG_AC_LOAD_TCLCONFIG, [
. $TCLCONFIG
AC_SUBST(TCL_DEFS)
AC_SUBST(TCL_LIB_FILE)
AC_SUBST(TCL_LIB_FULL_PATH)
AC_SUBST(TCL_LIBS)
AC_SUBST(TCL_CFLAGS)
AC_SUBST(TCL_SHLIB_CFLAGS)
AC_SUBST(TCL_SHLIB_LD)
AC_SUBST(TCL_LD_FLAGS)
AC_SUBST(TCL_LD_SEARCH_FLAGS)
AC_SUBST(TCL_RANLIB)
AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_LIB_SPEC)
AC_SUBST(TCL_BIN_DIR)
])
AC_DEFUN(CYG_AC_PATH_TK, [
CYG_AC_PATH_TKH
CYG_AC_PATH_TKCONFIG
CYG_AC_LOAD_TKCONFIG
])
AC_DEFUN(CYG_AC_PATH_TKH, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
no_tk=true
AC_MSG_CHECKING(for Tk headers in the source tree)
AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where tk headers are], with_tkinclude=${withval})
AC_CACHE_VAL(ac_cv_c_tkh,[
if test x"${with_tkinclude}" != x ; then
if test -f ${with_tkinclude}/tk.h ; then
ac_cv_c_tkh=`(cd ${with_tkinclude}; ${PWDCMD-pwd})`
elif test -f ${with_tkinclude}/generic/tk.h ; then
ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_tkinclude} directory doesn't contain headers])
fi
fi
if test x"${ac_cv_c_tkconfig}" != x ; then
for i in $dirlist; do
if test -f $ac_cv_c_tkconfig/$i/generic/tk.h ; then
ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/$i/generic; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tkh}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $srcdir/$i/tk* 2>/dev/null`" ; then
tkpath=$srcdir/$i
break
fi
done
for i in `ls -dr $tkpath/tk* 2>/dev/null ` ; do
if test -f $i/generic/tk.h ; then
ac_cv_c_tkh=`(cd $i/generic; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tkh}" = x ; then
AC_MSG_RESULT(none)
ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
if test -f $ccpath/tk.h; then
ac_cv_c_tkh=$ccpath
fi
else
AC_MSG_RESULT(${ac_cv_c_tkh})
fi
])
TKHDIR=""
if test x"${ac_cv_c_tkh}" = x ; then
AC_MSG_ERROR([Can't find any Tk headers])
fi
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 fi
AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
TKHDIR="-I${ac_cv_c_tkh}"
fi
fi
AC_SUBST(TKHDIR)
])
AC_DEFUN(CYG_AC_PATH_TKCONFIG, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
if test x"${no_tk}" = x ; then
no_tk=true
AC_ARG_WITH(tkconfig, [ --with-tkconfig directory containing tk configuration (tkConfig.sh)],
with_tkconfig=${withval})
AC_MSG_CHECKING([for Tk configuration script])
AC_CACHE_VAL(ac_cv_c_tkconfig,[
if test x"${with_tkconfig}" != x ; then
if test -f "${with_tkconfig}/tkConfig.sh" ; then
ac_cv_c_tkconfig=`(cd ${with_tkconfig}; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
fi
fi
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in $dirlist; do
if test -f $srcdir/$i/unix/tkConfig.sh ; then
ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})`
break
fi
if test -f $srcdir/$i/win/tkConfig.sh ; then
ac_cv_c_tkconfig=`(cd $srcdir/$i/unix; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tkconfig}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $i/tk* 2>/dev/null`" ; then
tkconfpath=$i
break
fi
done
for i in `ls -dr $tkconfpath/tk* 2>/dev/null ` ; do
if test -f $i/unix/tkConfig.sh ; then
ac_cv_c_tkconfig=`(cd $i/unix; ${PWDCMD-pwd})`
break
fi
if test -f $i/win/tkConfig.sh ; then
ac_cv_c_tkconfig=`(cd $i/win; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tkconfig}" = x ; then
ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
if test -f $ccpath/tkConfig.sh; then
ac_cv_c_tkconfig=$ccpath
fi
fi
]) dnl end of cache_val
if test x"${ac_cv_c_tkconfig}" = x ; then
TKCONFIG=""
AC_MSG_WARN(Can't find Tk configuration definitions)
else
no_tk=""
TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
AC_MSG_RESULT(${TKCONFIG})
fi
fi
AC_SUBST(TKCONFIG)
])
AC_DEFUN(CYG_AC_LOAD_TKCONFIG, [
if test -f "$TKCONFIG" ; then
. $TKCONFIG
fi
AC_SUBST(TK_VERSION)
AC_SUBST(TK_DEFS)
AC_SUBST(TK_LIB_FILE)
AC_SUBST(TK_LIB_FULL_PATH)
AC_SUBST(TK_LIBS)
AC_SUBST(TK_BUILD_INCLUDES)
AC_SUBST(TK_XINCLUDES)
AC_SUBST(TK_XLIBSW)
AC_SUBST(TK_BUILD_LIB_SPEC)
AC_SUBST(TK_LIB_SPEC)
])
AC_DEFUN(CYG_AC_PATH_ITCL, [
CYG_AC_PATH_ITCLH
CYG_AC_PATH_ITCLLIB
CYG_AC_PATH_ITCLSH
CYG_AC_PATH_ITCLMKIDX
])
AC_DEFUN(CYG_AC_PATH_ITCLH, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
no_itcl=true
AC_MSG_CHECKING(for Itcl headers in the source tree)
AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval})
AC_CACHE_VAL(ac_cv_c_itclh,[
if test x"${with_itclinclude}" != x ; then
if test -f ${with_itclinclude}/itcl.h ; then
ac_cv_c_itclh=`(cd ${with_itclinclude}; ${PWDCMD-pwd})`
elif test -f ${with_itclinclude}/src/itcl.h ; then
ac_cv_c_itclh=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_itclinclude} directory doesn't contain headers])
fi
fi
if test x"${ac_cv_c_itclconfig}" != x ; then
for i in $dirlist; do
if test -f $ac_cv_c_itclconfig/$i/src/itcl.h ; then
ac_cv_c_itclh=`(cd $ac_cv_c_itclconfig/$i/src; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_itclh}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then
itclpath=$srcdir/$i
break
fi
done
for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do
if test -f $i/src/itcl.h ; then
ac_cv_c_itclh=`(cd $i/src; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_itclh}" = x ; then
AC_MSG_RESULT(none)
AC_CHECK_HEADER(itcl.h, ac_cv_c_itclh=installed, ac_cv_c_itclh="")
else
AC_MSG_RESULT(${ac_cv_c_itclh})
fi
])
ITCLHDIR=""
if test x"${ac_cv_c_itclh}" = x ; then
AC_MSG_ERROR([Can't find any Itcl headers])
fi
if test x"${ac_cv_c_itclh}" != x ; then
no_itcl=""
if test x"${ac_cv_c_itclh}" != x"installed" ; then
AC_MSG_RESULT(${ac_cv_c_itclh})
ITCLHDIR="-I${ac_cv_c_itclh}"
fi
fi
AC_SUBST(ITCLHDIR)
])
AC_DEFUN(CYG_AC_PATH_ITCLLIB, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
if test x"${no_itcl}" = x ; then
no_itcl=true
AC_ARG_WITH(itcllib,
[ --with-itcllib directory where the itcl library is],
with_itcllib=${withval})
AC_MSG_CHECKING([for Itcl library])
AC_CACHE_VAL(ac_cv_c_itcllib,[
if test x"${with_itcllib}" != x ; then
if test -f "${with_itcllib}/libitcl$TCL_SHARED_LIB_SUFFIX" ; then
ac_cv_c_itcllib=`(cd ${with_itcllib}; ${PWDCMD-pwd})`/libitcl$TCL_SHARED_LIB_SUFFIX
else
if test -f "${with_itcllib}/libitcl$TCL_UNSHARED_LIB_SUFFIX"; then
ac_cv_c_itcllib=`(cd ${with_itcllib}; ${PWDCMD-pwd})`/libitcl$TCL_UNSHARED_LIB_SUFFIX
fi
fi
fi
if test x"${ac_cv_c_itcllib}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $i/itcl* 2>/dev/null`" ; then
itclpath=$i/itcl
break
fi
done
if test -f "$itclpath/src/libitcl.$TCL_SHLIB_SUFFIX" ; then
ac_cv_c_itcllib=`(cd $itclpath/src; ${PWDCMD-pwd})`
elif test -f "$itclpath/src/libitcl.a"; then
ac_cv_c_itcllib=`(cd $itclpath/src; ${PWDCMD-pwd})`
fi
fi
if test x"${ac_cv_c_itcllib}" = x ; then
for i in ${dirlist}; do
if test -n "`ls -dr ${srcdir}/$i/itcl* 2>/dev/null`" ; then
itclpath=${srcdir}/$i
break
fi
done
for i in `ls -dr ${itclpath}/itcl* 2>/dev/null` ; do
if test -f "$i/src/libitcl$TCL_SHLIB_SUFFIX" ; then
ac_cv_c_itcllib=`(cd $i/src; ${PWDCMD-pwd})`
break
elif test -f "$i/src/libitcl.a"; then
ac_cv_c_itcllib=`(cd $i/src; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_itcllib}" = x ; then
ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/lib
if test -f "${ccpath}/libitcl$TCL_SHLIB_SUFFIX" ; then
ac_cv_c_itcllib=`(cd ${ccpath}; ${PWDCMD-pwd})`
elif test -f "${ccpath}/libitcl.a"; then
ac_cv_c_itcllib=`(cd ${ccpath}; ${PWDCMD-pwd})`
fi
fi
])
if test x"${ac_cv_c_itcllib}" = x ; then
ITCLLIB=""
AC_MSG_WARN(Can't find Itcl library)
else
ITCLLIB="-L${ac_cv_c_itcllib}"
AC_MSG_RESULT(${ac_cv_c_itcllib})
no_itcl=""
fi
fi
AC_PROVIDE([$0])
AC_SUBST(ITCLLIB)
])
AC_DEFUN(CYG_AC_PATH_ITCLSH, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
no_itcl=true
AC_MSG_CHECKING(for the itcl_sh script)
AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval})
AC_CACHE_VAL(ac_cv_c_itclsh,[
if test x"${with_itclinclude}" != x ; then
if test -f ${with_itclinclude}/itcl_sh ; then
ac_cv_c_itclsh=`(cd ${with_itclinclude}; ${PWDCMD-pwd})`
elif test -f ${with_itclinclude}/src/itcl_sh ; then
ac_cv_c_itclsh=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh])
fi
fi
if test x"${ac_cv_c_itclsh}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then
itclpath=$srcdir/$i
break
fi
done
for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do
if test -f $i/src/itcl_sh ; then
ac_cv_c_itclsh=`(cd $i/src; ${PWDCMD-pwd})`/itcl_sh
break
fi
done
fi
if test x"${ac_cv_c_itclsh}" = x ; then
AC_MSG_RESULT(none)
AC_PATH_PROG(ac_cv_c_itclsh, itcl_sh)
else
AC_MSG_RESULT(${ac_cv_c_itclsh})
fi
])
if test x"${ac_cv_c_itclsh}" = x ; then
AC_MSG_ERROR([Can't find the itcl_sh script])
fi
if test x"${ac_cv_c_itclsh}" != x ; then
no_itcl=""
AC_MSG_RESULT(${ac_cv_c_itclsh})
ITCLSH="${ac_cv_c_itclsh}"
fi
AC_SUBST(ITCLSH)
])
AC_DEFUN(CYG_AC_PATH_ITCLMKIDX, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
no_itcl=true
AC_MSG_CHECKING(for itcl_mkindex.tcl script)
AC_ARG_WITH(itclinclude, [ --with-itclinclude directory where itcl headers are], with_itclinclude=${withval})
AC_CACHE_VAL(ac_cv_c_itclmkidx,[
if test x"${with_itclinclude}" != x ; then
if test -f ${with_itclinclude}/itcl_sh ; then
ac_cv_c_itclmkidx=`(cd ${with_itclinclude}; ${PWDCMD-pwd})`
elif test -f ${with_itclinclude}/src/itcl_sh ; then
ac_cv_c_itclmkidx=`(cd ${with_itclinclude}/src; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_itclinclude} directory doesn't contain itcl_sh])
fi
fi
if test x"${ac_cv_c_itclmkidx}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $srcdir/$i/itcl* 2>/dev/null`" ; then
itclpath=$srcdir/$i
break
fi
done
for i in `ls -dr $itclpath/itcl* 2>/dev/null ` ; do
if test -f $i/library/itcl_mkindex.tcl ; then
ac_cv_c_itclmkidx=`(cd $i/library; ${PWDCMD-pwd})`/itcl_mkindex.tcl
break
fi
done
fi
if test x"${ac_cv_c_itclmkidx}" = x ; then
ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/share
for i in `ls -dr $ccpath/itcl* 2>/dev/null ` ; do
if test -f $i/itcl_mkindex.tcl ; then
ac_cv_c_itclmkidx=`(cd $i; ${PWDCMD-pwd})`/itcl_mkindex.tcl
break
fi
done
fi
])
if test x"${ac_cv_c_itclmkidx}" = x ; then
AC_MSG_ERROR([Can't find the itcl_mkindex.tcl script])
fi
if test x"${ac_cv_c_itclmkidx}" != x ; then
no_itcl=""
AC_MSG_RESULT(${ac_cv_c_itclmkidx})
ITCLMKIDX="${ac_cv_c_itclmkidx}"
else
AC_MSG_RESULT(none)
fi
AC_SUBST(ITCLMKIDX)
])
AC_DEFUN(CYG_AC_PATH_TIX, [
CYG_AC_PATH_TIXH
CYG_AC_PATH_TIXLIB
])
AC_DEFUN(CYG_AC_PATH_TIXH, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
no_tix=true
AC_MSG_CHECKING(for Tix headers in the source tree)
AC_ARG_WITH(tixinclude, [ --with-tixinclude directory where tix headers are], with_tixinclude=${withval})
AC_CACHE_VAL(ac_cv_c_tixh,[
if test x"${with_tixinclude}" != x ; then
if test -f ${with_tixinclude}/tix.h ; then
ac_cv_c_tixh=`(cd ${with_tixinclude}; ${PWDCMD-pwd})`
elif test -f ${with_tixinclude}/generic/tix.h ; then
ac_cv_c_tixh=`(cd ${with_tixinclude}/generic; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_tixinclude} directory doesn't contain headers])
fi
fi
if test x"${ac_cv_c_tixconfig}" != x ; then
for i in $dirlist; do
if test -f $ac_cv_c_tixconfig/$i/generic/tix.h ; then
ac_cv_c_tixh=`(cd $ac_cv_c_tixconfig/$i/generic; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tixh}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $srcdir/$i/tix* 2>/dev/null`" ; then
tixpath=$srcdir/$i
break
fi
done
for i in `ls -dr $tixpath/tix* 2>/dev/null ` ; do
if test -f $i/generic/tix.h ; then
ac_cv_c_tixh=`(cd $i/generic; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_tixh}" = x ; then
AC_MSG_RESULT(none)
ccpath=`which ${CC} | sed -e 's:/bin/.*::'`/include
if test -f $ccpath/tix.h; then
ac_cv_c_tixh=installed
fi
else
AC_MSG_RESULT(${ac_cv_c_tixh})
fi
])
if test x"${ac_cv_c_tixh}" = x ; then
AC_MSG_ERROR([Can't find any Tix headers])
fi
if test x"${ac_cv_c_tixh}" != x ; then
no_tix=""
AC_MSG_RESULT(${ac_cv_c_tixh})
if test x"${ac_cv_c_tixh}" != x"installed" ; then
TIXHDIR="-I${ac_cv_c_tixh}"
fi
fi
AC_SUBST(TIXHDIR)
])
AC_DEFUN(CYG_AC_PATH_TIXCONFIG, [
if test x"${no_tix}" = x ; then
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,[
if test x"${with_tixconfig}" != x ; then
if test -f "${with_tixconfig}/tixConfig.sh" ; then
ac_cv_c_tixconfig=`(cd ${with_tixconfig}; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh])
fi
fi
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; ${PWDCMD-pwd})`
break
fi
done
fi
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; ${PWDCMD-pwd})`
break
fi
done
fi
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; ${PWDCMD-pwd})`
break
fi
done
fi
])
if test x"${ac_cv_c_tixconfig}" = x ; then
TIXCONFIG=" 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
])
AC_DEFUN(CYG_AC_LOAD_TIXCONFIG, [
if test -f "$TIXCONFIG" ; then
. $TIXCONFIG
fi
AC_SUBST(TIX_BUILD_LIB_SPEC)
AC_SUBST(TIX_LIB_FULL_PATH)
])
AC_DEFUN(CYG_AC_PATH_ITCLCONFIG, [
if test x"${no_itcl}" = x ; then
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,[
if test x"${with_itclconfig}" != x ; then
if test -f "${with_itclconfig}/itclConfig.sh" ; then
ac_cv_c_itclconfig=`(cd ${with_itclconfig}; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh])
fi
fi
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; ${PWDCMD-pwd})`
break
fi
done
fi
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; ${PWDCMD-pwd})`
break
fi
done
fi
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; ${PWDCMD-pwd})`
break
fi
done
fi
])
if test x"${ac_cv_c_itclconfig}" = x ; then
ITCLCONFIG=" 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
])
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, [
if test x"${no_itk}" = x ; then
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,[
if test x"${with_itkconfig}" != x ; then
if test -f "${with_itkconfig}/itkConfig.sh" ; then
ac_cv_c_itkconfig=`(cd ${with_itkconfig}; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh])
fi
fi
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; ${PWDCMD-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; ${PWDCMD-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; ${PWDCMD-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_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)
])
AC_DEFUN(CYG_AC_PATH_LIBGUI, [
CYG_AC_PATH_LIBGUIH
CYG_AC_PATH_LIBGUILIB
])
AC_DEFUN(CYG_AC_PATH_LIBGUIH, [
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../..../../../../../../../../../../.."
no_libgui=true
AC_MSG_CHECKING(for Libgui headers in the source tree)
AC_ARG_WITH(libguiinclude, [ --with-libguiinclude directory where libgui headers are], with_libguiinclude=${withval})
AC_CACHE_VAL(ac_cv_c_libguih,[
if test x"${with_libguiinclude}" != x ; then
if test -f ${with_libguiinclude}/guitcl.h ; then
ac_cv_c_libguih=`(cd ${with_libguiinclude}; ${PWDCMD-pwd})`
elif test -f ${with_libguiinclude}/src/guitcl.h ; then
ac_cv_c_libguih=`(cd ${with_libguiinclude}/src; ${PWDCMD-pwd})`
else
AC_MSG_ERROR([${with_libguiinclude} directory doesn't contain headers])
fi
fi
if test x"${ac_cv_c_libguiconfig}" != x ; then
for i in $dirlist; do
if test -f $ac_cv_c_libguiconfig/$i/src/guitcl.h ; then
ac_cv_c_libguih=`(cd $ac_cv_c_libguiconfig/$i/src; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_libguih}" = x ; then
for i in $dirlist; do
if test -n "`ls -dr $srcdir/$i/libgui* 2>/dev/null`" ; then
libguipath=$srcdir/$i
break
fi
done
for i in `ls -dr $libguipath/libgui* 2>/dev/null ` ; do
if test -f $i/src/guitcl.h ; then
ac_cv_c_libguih=`(cd $i/src; ${PWDCMD-pwd})`
break
fi
done
fi
if test x"${ac_cv_c_libguih}" = x ; then
AC_MSG_RESULT(none)
AC_CHECK_HEADER(guitcl.h, ac_cv_c_libguih=installed, ac_cv_c_libguih="")
fi
])
LIBGUIHDIR=""
if test x"${ac_cv_c_libguih}" = x ; then
AC_MSG_WARN([Can't find any Libgui headers])
fi
if test x"${ac_cv_c_libguih}" != x ; then
no_libgui=""
if test x"${ac_cv_c_libguih}" != x"installed" ; then
LIBGUIHDIR="-I${ac_cv_c_libguih}"
fi
fi
AC_MSG_RESULT(${ac_cv_c_libguih})
AC_SUBST(LIBGUIHDIR)
])
AC_DEFUN(CYG_AC_PATH_LIBGUILIB, [
AC_MSG_CHECKING(for GUI library in the build tree)
dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.."
AC_MSG_CHECKING(for GUI library)
AC_CACHE_VAL(ac_cv_c_libguilib,[
if test x"${ac_cv_c_libguilib}" = x ; then
for i in $dirlist; do
if test -f "$i/libgui/src/Makefile" ; then
ac_cv_c_libguilib=`(cd $i/libgui/src; ${PWDCMD-pwd})`
break
fi
done
fi
])
if test x"${ac_cv_c_libguilib}" != x ; then
GUILIB="${GUILIB} -L${ac_cv_c_libguilib}"
LIBGUILIB="-lgui"
AC_MSG_RESULT(${ac_cv_c_libguilib})
else
AC_MSG_RESULT(none)
fi
AC_SUBST(GUILIB)
AC_SUBST(LIBGUILIB)
])