dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
sinclude(../bfd/acinclude.m4)
-dnl CY_AC_PATH_TCLCONFIG and CY_AC_LOAD_TCLCONFIG should be invoked
-dnl (in that order) before any other TCL macros. Similarly for TK.
+dnl This gets the standard macros, like the TCL, TK, etc ones.
+sinclude(../config/acinclude.m4)
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
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)],
+ 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,[
`ls -dr ../../itcl[[4-9]]*/itcl 2>/dev/null` \
../../../itcl \
`ls -dr ../../../itcl[[4-9]]*/itcl 2>/dev/null` ; do
- if test -f "$i/${configdir}/itclConfig.sh" ; then
- ac_cv_c_itclconfig=`(cd $i/${configdir}; pwd)`
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
break
fi
done
for i in \
${srcdir}/../itcl/itcl \
`ls -dr ${srcdir}/../itcl[[4-9]]*/itcl 2>/dev/null` ; do
- if test -f "$i/${configdir}/itclConfig.sh" ; then
- ac_cv_c_itclconfig=`(cd $i/${configdir}; pwd)`
+ if test -f "$i/itclConfig.sh" ; then
+ ac_cv_c_itclconfig=`(cd $i; pwd)`
break
fi
done
AC_MSG_RESULT(found $ITCLCONFIG)
fi
fi
-
])
# Defined as a separate macro so we don't have to cache the values
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)],
+ 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,[
`ls -dr ../../itcl[[4-9]]*/itk 2>/dev/null` \
../../../itk \
`ls -dr ../../../itcl[[4-9]]*/itk 2>/dev/null` ; do
- if test -f "$i/${configdir}/itkConfig.sh" ; then
- ac_cv_c_itkconfig=`(cd $i/${configdir}; pwd)`
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
break
fi
done
for i in \
${srcdir}/../itcl/itk \
`ls -dr ${srcdir}/../itcl[[4-9]]*/itk 2>/dev/null` ; do
- if test -f "$i/${configdir}/itkConfig.sh" ; then
- ac_cv_c_itkconfig=`(cd $i/${configdir}; pwd)`
+ if test -f "$i/itkConfig.sh" ; then
+ ac_cv_c_itkconfig=`(cd $i; pwd)`
break
fi
done
# check for Tix headers.
-AC_DEFUN(CY_AC_PATH_TIX, [
+AC_DEFUN(CY_AC_PATH_TIXH, [
AC_MSG_CHECKING(for Tix private headers. srcdir=${srcdir})
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
AC_SUBST(TIXHDIR)
])
+AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
+#
+# Ok, lets find the tix configuration
+# First, look for one uninstalled.
+# the alternative search directory is invoked by --with-itkconfig
+#
+
+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
+
+ # then check for a private Tix library
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ../tix \
+ `ls -dr ../tix 2>/dev/null` \
+ ../../tix \
+ `ls -dr ../../tix 2>/dev/null` \
+ ../../../tix \
+ `ls -dr ../../../tix 2>/dev/null` ; do
+ echo "**** Looking at $i - with ${configdir}"
+ 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
+ echo "**** Looking at $i"
+ if test -f "$i/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ # check in a few other private locations
+ echo "**** Other private locations"
+ if test x"${ac_cv_c_tixconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tix \
+ `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
+ echo "**** Looking at $i - with ${configdir}"
+ if test -f "$i/${configdir}/tixConfig.sh" ; then
+ ac_cv_c_tixconfig=`(cd $i/${configdir}; 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(CY_AC_LOAD_TIXCONFIG, [
+ if test -f "$TIXCONFIG" ; then
+ . $TIXCONFIG
+ fi
+
+ AC_SUBST(TIX_VERSION)
+dnl not actually used, don't export to save symbols
+dnl AC_SUBST(TIX_MAJOR_VERSION)
+dnl AC_SUBST(TIX_MINOR_VERSION)
+dnl AC_SUBST(TIX_DEFS)
+
+dnl not used, don't export to save symbols
+dnl dnl AC_SUBST(TIX_LIB_FILE)
+
+dnl not used outside of configure
+dnl AC_SUBST(TIX_LIBS)
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TIX_PREFIX)
+
+dnl not used, don't export to save symbols
+dnl AC_SUBST(TIX_EXEC_PREFIX)
+
+dnl AC_SUBST(TIX_BUILD_INCLUDES)
+ AC_SUBST(TIX_BUILD_LIB_SPEC)
+dnl AC_SUBST(TIX_LIB_SPEC)
+])
+
# serial 1
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS)
+ AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT)
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define as 1 if you have gettext and don't want to use GNU gettext.])
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY)
+ AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
fi
AM_LC_MESSAGES
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES)
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your locale.h file contains LC_MESSAGES.])
fi
fi])