Check for <sys/poll.h>.
[deliverable/binutils-gdb.git] / gdb / aclocal.m4
index 3c1e4ece98236019750482407989f094bebfd880..de9e2d5e5a0bec3f712f07735412748596ca5e1b 100644 (file)
@@ -16,8 +16,8 @@ dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov>
 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,
@@ -505,7 +505,7 @@ AC_DEFUN(CY_AC_PATH_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)],
+  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,[
@@ -528,8 +528,8 @@ if test x"${no_itcl}" = x ; then
                `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
@@ -548,8 +548,8 @@ if test x"${no_itcl}" = x ; then
     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
@@ -564,7 +564,6 @@ if test x"${no_itcl}" = x ; then
     AC_MSG_RESULT(found $ITCLCONFIG)
   fi
 fi
-
 ])
 
 # Defined as a separate macro so we don't have to cache the values
@@ -632,7 +631,7 @@ AC_DEFUN(CY_AC_PATH_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)],
+  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,[
@@ -655,8 +654,8 @@ if test x"${no_itk}" = x ; then
                `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
@@ -675,8 +674,8 @@ if test x"${no_itk}" = x ; then
     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
@@ -748,7 +747,7 @@ AC_SUBST(ITKHDIR)
 
 # 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
@@ -768,6 +767,144 @@ fi
 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)
+])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN(AM_MAINTAINER_MODE,
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT($USE_MAINTAINER_MODE)
+  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi])
+
 
 # serial 1
 
@@ -882,7 +1019,7 @@ AC_DEFUN(CY_WITH_NLS,
 
     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],
@@ -916,7 +1053,8 @@ AC_DEFUN(CY_WITH_NLS,
 
           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
@@ -1037,7 +1175,7 @@ __argz_count __argz_stringify __argz_next])
      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
@@ -1195,7 +1333,8 @@ AC_DEFUN(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])
 
This page took 0.030354 seconds and 4 git commands to generate.