daily update
[deliverable/binutils-gdb.git] / gdb / configure.in
index 79ca23022b3e8513d0fb2e183ffbeedb38fce80b..29518ecdc14da3b3d8337c6a7d0370f089b16ce3 100644 (file)
@@ -131,9 +131,28 @@ AC_HEADER_STAT
 
 AC_C_CONST
 
-AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask)
-AC_FUNC_VFORK
+AC_CHECK_FUNCS(bcopy btowc bzero isascii poll sbrk setpgid setpgrp \
+       sigaction sigprocmask sigsetmask)
 AC_FUNC_ALLOCA
+AC_FUNC_VFORK
+dnl AC_FUNC_SETPGRP does not work when cross compiling
+dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
+if test "$cross_compiling" = no; then
+  AC_FUNC_SETPGRP
+else
+  AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void,
+    [AC_TRY_COMPILE([
+#include <unistd.h>
+], [
+  if (setpgrp(1,1) == -1)
+    exit (0);
+  else
+    exit (1);
+], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
+if test $ac_cv_func_setpgrp_void = yes; then
+  AC_DEFINE(SETPGRP_VOID, 1)
+fi
+fi
 
 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
 # since sigsetjmp might only be defined as a macro.
@@ -923,11 +942,31 @@ configdir="unix"
 GDBTKLIBS=
 if test "${enable_gdbtk}" = "yes"; then
 
+    # Gdbtk must have an absolute path to srcdir in order to run
+    # properly when not installed.
+    here=`pwd`
+    cd ${srcdir}
+    GDBTK_SRC_DIR=`pwd`
+    cd $here
+
     CY_AC_PATH_TCLCONFIG
     if test -z "${no_tcl}"; then
        CY_AC_LOAD_TCLCONFIG
        CY_AC_PATH_TKCONFIG
 
+       # now look for Tcl library stuff
+
+       case "${host}" in
+       *-*-cygwin*)
+           tcldir=../tcl/win/
+           ;;
+       *)
+           tcldir=../tcl/unix/
+           ;;
+       esac
+
+       TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
+
        # If $no_tk is nonempty, then we can't do Tk, and there is no
        # point to doing Tcl.
        if test -z "${no_tk}"; then
@@ -938,23 +977,28 @@ if test "${enable_gdbtk}" = "yes"; then
           CY_AC_PATH_ITKH
           CY_AC_PATH_TIXH
 
+
+          # now look for Tk library stuff
+
+          case "${host}" in
+          *-*-cygwin*)
+              tkdir=../tk/win/
+              ;;
+          *)
+              tkdir=../tk/unix/
+              ;;
+          esac
+
+          TK_DEPS="${tkdir}${TK_LIB_FILE}"
+
           # now look for Itcl library stuff
 
           CY_AC_PATH_ITCLCONFIG
            if test -z "${no_itcl}"; then
-             CY_AC_LOAD_ITCLCONFIG
-            case "${host}" in
-            *-*-cygwin*)
-               itcldir=../itcl/itcl/win/
-               ;;
-            *)
-               itcldir=../itcl/itcl/unix/
-               ;;
-            esac
+             CY_AC_LOAD_ITCLCONFIG 
 
             ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
-            ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
+            ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
            fi
 
           
@@ -963,17 +1007,8 @@ if test "${enable_gdbtk}" = "yes"; then
            if test -z "${no_itcl}"; then
              CY_AC_LOAD_ITKCONFIG
 
-            case "${host}" in
-              *-*-cygwin*)
-                itkdir=../itcl/itk/win/
-                ;;
-              *)
-                itkdir=../itcl/itk/unix/
-                ;;
-              esac 
-
             ITKLIB="${ITK_BUILD_LIB_SPEC}"
-            ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
+            ITK_DEPS="${ITK_LIB_FULL_PATH}"
            fi
 
           # now look for Tix library stuff
@@ -1025,6 +1060,8 @@ fi
 AC_SUBST(X_CFLAGS)
 AC_SUBST(X_LDFLAGS)
 AC_SUBST(X_LIBS)
+AC_SUBST(TCL_DEPS)
+AC_SUBST(TK_DEPS)
 AC_SUBST(ITCLLIB)
 AC_SUBST(ITCL_DEPS)
 AC_SUBST(ITKLIB)
@@ -1033,6 +1070,7 @@ AC_SUBST(TIXLIB)
 AC_SUBST(TIX_DEPS)
 AC_SUBST(GDBTKLIBS)
 AC_SUBST(GDBTK_CFLAGS)
+AC_SUBST(GDBTK_SRC_DIR)
 
 AC_PATH_X
 
This page took 0.024618 seconds and 4 git commands to generate.