Sync config/warnings.m4 with GCC
[deliverable/binutils-gdb.git] / config / tcl.m4
index 51809fdc0bd7a357a3f63bcaab5b9127d6012dfc..59a0c7e0a59345abbad024cd38aa751fab827d69 100644 (file)
@@ -32,6 +32,10 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
        AC_CACHE_VAL(ac_cv_c_tclconfig,[
 
            # First check to see if --with-tcl was specified.
+           case "${host}" in
+               *-*-cygwin*) platDir="win" ;;
+               *) platDir="unix" ;;
+           esac
            if test x"${with_tclconfig}" != x ; then
                if test -f "${with_tclconfig}/tclConfig.sh" ; then
                    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
@@ -55,8 +59,8 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
                        `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
                        `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
                        `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                       ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+                   if test -f "$i/$platDir/tclConfig.sh" ; then
+                       ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
                        break
                    fi
                done
@@ -99,8 +103,8 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
                        `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
                        `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
                        `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
-                   if test -f "$i/unix/tclConfig.sh" ; then
-                   ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+                   if test -f "$i/$platDir/tclConfig.sh" ; then
+                   ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
                    break
                fi
                done
@@ -110,7 +114,6 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
        if test x"${ac_cv_c_tclconfig}" = x ; then
            TCL_BIN_DIR="# no Tcl configs found"
            AC_MSG_WARN([Can't find Tcl configuration definitions])
-           exit 0
        else
            no_tcl=
            TCL_BIN_DIR=${ac_cv_c_tclconfig}
@@ -161,6 +164,10 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
            fi
 
            # then check for a private Tk library
+           case "${host}" in
+               *-*-cygwin*) platDir="win" ;;
+               *) platDir="unix" ;;
+           esac
            if test x"${ac_cv_c_tkconfig}" = x ; then
                for i in \
                        ../tk \
@@ -175,8 +182,8 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
                        `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
                        `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
                        `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-                   if test -f "$i/unix/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+                   if test -f "$i/$platDir/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
                        break
                    fi
                done
@@ -218,8 +225,8 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
                        `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
                        `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
                        `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
-                   if test -f "$i/unix/tkConfig.sh" ; then
-                       ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+                   if test -f "$i/$platDir/tkConfig.sh" ; then
+                       ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
                        break
                    fi
                done
@@ -229,7 +236,6 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
        if test x"${ac_cv_c_tkconfig}" = x ; then
            TK_BIN_DIR="# no Tk configs found"
            AC_MSG_WARN([Can't find Tk configuration definitions])
-           exit 0
        else
            no_tk=
            TK_BIN_DIR=${ac_cv_c_tkconfig}
@@ -277,17 +283,17 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
     # installed and uninstalled version of Tcl.
-    if test -f ${TCL_BIN_DIR}/Makefile ; then
+    if test -f "${TCL_BIN_DIR}/Makefile" ; then
         TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
         TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
         TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
     elif test "`uname -s`" = "Darwin"; then
        # If Tcl was built as a framework, attempt to use the libraries
        # from the framework at the given location so that linking works
-       # against Tcl.framework installed in an arbitary location.
+       # against Tcl.framework installed in an arbitrary location.
        case ${TCL_DEFS} in
            *TCL_FRAMEWORK*)
-               if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
+               if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
                    for i in "`cd ${TCL_BIN_DIR}; pwd`" \
                             "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
                        if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
@@ -296,7 +302,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
                        fi
                    done
                fi
-               if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
+               if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
                    TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
                    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
                fi
@@ -360,17 +366,17 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
     # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
     # instead of TK_BUILD_LIB_SPEC since it will work with both an
     # installed and uninstalled version of Tcl.
-    if test -f ${TK_BIN_DIR}/Makefile ; then
+    if test -f "${TK_BIN_DIR}/Makefile" ; then
         TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
         TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
         TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
     elif test "`uname -s`" = "Darwin"; then
        # If Tk was built as a framework, attempt to use the libraries
        # from the framework at the given location so that linking works
-       # against Tk.framework installed in an arbitary location.
+       # against Tk.framework installed in an arbitrary location.
        case ${TK_DEFS} in
            *TK_FRAMEWORK*)
-               if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then
+               if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
                    for i in "`cd ${TK_BIN_DIR}; pwd`" \
                             "`cd ${TK_BIN_DIR}/../..; pwd`"; do
                        if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
@@ -379,7 +385,7 @@ AC_DEFUN([SC_LOAD_TKCONFIG], [
                        fi
                    done
                fi
-               if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then
+               if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
                    TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
                    TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
                fi
@@ -809,7 +815,7 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [
 #
 #      Defines the following variable:
 #
-#      MAN_FLAGS -     The apropriate flags for installManPage
+#      MAN_FLAGS -     The appropriate flags for installManPage
 #                      according to the user's selection.
 #
 #--------------------------------------------------------------------
This page took 0.027651 seconds and 4 git commands to generate.