summaryrefslogtreecommitdiff
path: root/Build/source/texk/m4/kpse_unset.m4
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/m4/kpse_unset.m4')
-rw-r--r--Build/source/texk/m4/kpse_unset.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/Build/source/texk/m4/kpse_unset.m4 b/Build/source/texk/m4/kpse_unset.m4
new file mode 100644
index 00000000000..a93d8ef0da8
--- /dev/null
+++ b/Build/source/texk/m4/kpse_unset.m4
@@ -0,0 +1,34 @@
+# Private macros for the kpathsea library.
+# by Karl Berry <karl@freefriends.org>
+# Copyright (C) 199? - 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AC_UNSET_CC
+# -----------
+# Unset CC to run configure with cross compiler.
+AC_DEFUN([AC_UNSET_CC], [
+ZZ=
+if test "$cross_compiling" = yes &&
+ (test "x$CC" = "xdos-gcc" || test "x$CC" = "xi386-mingw32-gcc" || test "x$CC" = "xgnuwin32gcc") ; then
+ZZ=$CC
+unset CC
+cross_compiling=no
+fi
+])
+
+# AC_RESET_CC
+# -----------
+# Restore CC that has been unset by AC_UNSET_CC
+AC_DEFUN([AC_RESET_CC], [
+if test "x$ZZ" = "xdos-gcc" || test "x$ZZ" = "xi386-mingw32-gcc" || test "x$ZZ" = "xgnuwin32gcc" ; then
+CC=$ZZ
+cross_compiling=yes
+fi
+])
+