This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Get tcl/tk libraries building for cygwin


Apparently building the tcl/tk libraries for cygwin have been broken for
months after upgrading to a newer version of autoconf.  I've checked in
the patch below to fix that.

cgf

tcl/win/ChangeLog:
2006-11-30  Christopher Faylor  <cgf@timesys.com>

	* cygwin/configure.in (LIB_AC_PROG_CC): Upgrade macro to accommodate
	newer version of autoconf.
	* cygwin/configure: Regenerate.
	* win/tcl.m4: Upgrade to avoid use of obsolete ac_cv_cygwin variable.
	* win/configure: Regenerate.

tk/win/ChangeLog:
2006-11-30  Christopher Faylor  <cgf@timesys.com>

	* tk/win/tcl.m4 (LIB_AC_PROG_CC): Upgrade macro to accommodate newer
	version of autoconf.
	* tk/win/configure: Regenerate.

Index: cygwin/configure.in
==================================================================RCS file: /cvs/uberbaum/tcl/cygwin/configure.in,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- cygwin/configure.in	13 Jul 2006 15:46:46 -0000	1.12
+++ cygwin/configure.in	1 Dec 2006 03:41:02 -0000	1.13
@@ -14,33 +14,25 @@
 # link an executable.  This should really be fixed in autoconf
 # itself.

-AC_DEFUN(LIB_AC_PROG_CC,
+AC_DEFUN([LIB_AC_PROG_CC],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
-  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+AC_CHECK_TOOL(CC, gcc, gcc)
+: ${CC:=gcc}
+AC_PROG_CC
+test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+])
+
+AC_DEFUN([LIB_AC_PROG_CXX],
+[AC_BEFORE([$0], [AC_PROG_CPP])dnl
+AC_CHECK_TOOL(CXX, g++, g++)
+if test -z "$CXX"; then
+  AC_CHECK_TOOL(CXX, g++, c++, , , )
+  : ${CXX:=g++}
+  AC_PROG_CXX
   test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
 fi

-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  CFLAGS-  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
-  GCC-  test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
+CXXFLAGS='$(CFLAGS)'
 ])

 LIB_AC_PROG_CC
Index: win/tcl.m4
==================================================================RCS file: /cvs/uberbaum/tcl/win/tcl.m4,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- win/tcl.m4	7 Feb 2003 19:52:00 -0000	1.7
+++ win/tcl.m4	1 Dec 2006 03:41:02 -0000	1.8
@@ -414,11 +414,7 @@
 	cyg_conftest     fi

-    if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
-        DEPARG='"$<"'
-    else
-        DEPARG='"$(shell $(CYGPATH) $<)"'
-    fi
+    DEPARG='$<' # Legacy variable.  Really don't need this

     # set various compiler flags depending on whether we are using gcc or cl

@@ -442,30 +438,19 @@
 	MAKE_EXE="\${CC} -o \[$]@"
 	LIBPREFIX="lib"

-	#if test "$ac_cv_cygwin" = "yes"; then
-	#    extra_cflags="-mno-cygwin"
-	#    extra_ldflags="-mno-cygwin"
-	#else
-	#    extra_cflags=""
-	#    extra_ldflags=""
-	#fi
-
-	if test "$ac_cv_cygwin" = "yes"; then
-	  touch ac$$.c
-	  if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
-	    case "$extra_cflags" in
-	      *-mwin32*) ;;
-	      *) extra_cflags="-mwin32 $extra_cflags" ;;
-	    esac
-	    case "$extra_ldflags" in
-	      *-mwin32*) ;;
-	      *) extra_ldflags="-mwin32 $extra_ldflags" ;;
-	    esac
-	  fi
-	  rm -f ac$$.o ac$$.c
+	if ! ${CC} -mwin32 -c -xc /dev/null -o ac$$.c >/dev/null 2>&1; then
+	  : ${extra_cflags=''}
+	  : ${extra_ldflags=''}
 	else
-	  extra_cflags=''
-	  extra_ldflags=''
+	  rm -f ac$$.c
+	  case "$extra_cflags" in
+	    *-mwin32*) ;;
+	    *) extra_cflags="-mwin32 $extra_cflags" ;;
+	  esac
+	  case "$extra_ldflags" in
+	    *-mwin32*) ;;
+	    *) extra_ldflags="-mwin32 $extra_ldflags" ;;
+	  esac
 	fi

 	if test "${SHARED_BUILD}" = "0" ; then
Index: win/tcl.m4
==================================================================RCS file: /cvs/uberbaum/tk/win/tcl.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- win/tcl.m4	14 Oct 2003 16:50:32 -0000	1.8
+++ win/tcl.m4	1 Dec 2006 03:49:10 -0000	1.9
@@ -404,11 +404,7 @@
 	cyg_conftest     fi

-    if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
-        DEPARG='"$<"'
-    else
-        DEPARG='"$(shell $(CYGPATH) $<)"'
-    fi
+    DEPARG='$<' # Legacy variable.  Really don't need this

     # set various compiler flags depending on whether we are using gcc or cl

@@ -432,30 +428,19 @@
 	MAKE_EXE="\${CC} -o \[$]@"
 	LIBPREFIX="lib"

-	#if test "$ac_cv_cygwin" = "yes"; then
-	#    extra_cflags="-mno-cygwin"
-	#    extra_ldflags="-mno-cygwin"
-	#else
-	#    extra_cflags=""
-	#    extra_ldflags=""
-	#fi
-
-	if test "$ac_cv_cygwin" = "yes"; then
-	  touch ac$$.c
-	  if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
-	    case "$extra_cflags" in
-	      *-mwin32*) ;;
-	      *) extra_cflags="-mwin32 $extra_cflags" ;;
-	    esac
-	    case "$extra_ldflags" in
-	      *-mwin32*) ;;
-	      *) extra_ldflags="-mwin32 $extra_ldflags" ;;
-	    esac
-	  fi
-	  rm -f ac$$.o ac$$.c
+	if ! ${CC} -mwin32 -c -xc /dev/null -o ac$$.c >/dev/null 2>&1; then
+	  : ${extra_cflags=''}
+	  : ${extra_ldflags=''}
 	else
-	  extra_cflags=''
-	  extra_ldflags=''
+	  rm -f ac$$.c
+	  case "$extra_cflags" in
+	    *-mwin32*) ;;
+	    *) extra_cflags="-mwin32 $extra_cflags" ;;
+	  esac
+	  case "$extra_ldflags" in
+	    *-mwin32*) ;;
+	    *) extra_ldflags="-mwin32 $extra_ldflags" ;;
+	  esac
 	fi

 	if test "${SHARED_BUILD}" = "0" ; then


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]