[patch] 1.2.5: Fix nomenclature for cross-compilation

Maciej W. Rozycki macro at linux-mips.org
Mon Aug 2 14:38:43 CEST 2004


Hello,

 Gnupg currently uses the term "target" to refer to the system it's going
to be run on.  That contradicts the autoconf definition of the target
system, which is reserved for tools like compilers that deal with
system-specific formats while running on a different system.  The system
software is going to be run on is correctly referred to as "host".

 Here is a patch that makes appropriate corrections to scripts.

2004-08-02  Maciej W. Rozycki  <macro at linux-mips.org>

	* acinclude.m4: Replace references to "target" with "host" 
	throughout.
	* configure.ac: Likewise.  Replace a call to AC_CANONICAL_TARGET 
	with AC_CANONICAL_HOST.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

 Please apply.

  Maciej

gnupg-1.2.4-host.patch
diff -up --recursive --new-file gnupg-1.2.4.macro/acinclude.m4 gnupg-1.2.4/acinclude.m4
--- gnupg-1.2.4.macro/acinclude.m4	2003-04-15 12:16:18.000000000 +0000
+++ gnupg-1.2.4/acinclude.m4	2004-06-10 21:35:46.000000000 +0000
@@ -168,13 +168,13 @@ dnl GNUPG_CHECK_CACHE
 dnl
 define(GNUPG_CHECK_CACHE,
   [ AC_MSG_CHECKING(cached information)
-    gnupg_hostcheck="$target"
+    gnupg_hostcheck="$host"
     AC_CACHE_VAL(gnupg_cv_hostcheck, [ gnupg_cv_hostcheck="$gnupg_hostcheck" ])
     if test "$gnupg_cv_hostcheck" != "$gnupg_hostcheck"; then
         AC_MSG_RESULT(changed)
         AC_MSG_WARN(config.cache exists!)
         AC_MSG_ERROR(you must do 'make distclean' first to compile for
-                 different target or different parameters.)
+                 different host or different parameters.)
     else
         AC_MSG_RESULT(ok)
     fi
@@ -669,7 +669,7 @@ AC_CHECK_TOOL(AS, as, false)
 #                              with an underscore?
 AC_DEFUN(GNUPG_SYS_SYMBOL_UNDERSCORE,
 [tmp_do_check="no"
-case "${target}" in
+case "${host}" in
     i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp)
         ac_cv_sys_symbol_underscore=yes
         ;;
diff -up --recursive --new-file gnupg-1.2.4.macro/configure.ac gnupg-1.2.4/configure.ac
--- gnupg-1.2.4.macro/configure.ac	2003-12-23 19:20:58.000000000 +0000
+++ gnupg-1.2.4/configure.ac	2004-06-10 21:03:37.000000000 +0000
@@ -35,7 +35,7 @@ ALL_LINGUAS="be ca cs da de eo el es et 
 
 AC_CONFIG_AUX_DIR(scripts)
 AC_CONFIG_SRCDIR(g10/g10.c)
-AC_CANONICAL_TARGET()
+AC_CANONICAL_HOST
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
 
@@ -293,7 +293,7 @@ MPI_OPT_FLAGS=""
 
 try_gettext=yes
 have_dosish_system=no
-case "${target}" in
+case "${host}" in
     *-*-mingw32*)
         # special stuff for Windoze NT
         ac_cv_have_dev_random=no
@@ -450,7 +450,7 @@ fi
 AC_SUBST(GPGKEYS_MAILTO)
 AC_SUBST(GPGKEYS_HKP)
 
-case "${target}" in
+case "${host}" in
     *-*-mingw32*)
         PRINTABLE_OS_NAME="MingW32"
         ;;
@@ -481,7 +481,7 @@ AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$
 #
 NAME_OF_DEV_RANDOM="/dev/random"
 NAME_OF_DEV_URANDOM="/dev/urandom"
-case "${target}" in
+case "${host}" in
     *-openbsd*)
         NAME_OF_DEV_RANDOM="/dev/srandom"
         NAME_OF_DEV_URANDOM="/dev/urandom"
@@ -721,7 +721,7 @@ if test "$use_static_rnd" = default; the
      if test "$ac_cv_have_dev_random" = yes; then
         random_modules="rndlinux"
      else
-         case "${target}" in
+         case "${host}" in
             *-*-mingw32*|*-*-cygwin*)
                 random_modules="rndw32"
                 ;;
@@ -885,7 +885,7 @@ GNUPG_CHECK_GNUMAKE
 
 # add some extra libs here so that previous tests don't fail for
 # mysterious reasons - the final link step should bail out. 
-case "${target}" in
+case "${host}" in
     *-*-mingw32*)
 dnl      NETLIBS="$NETLIBS -lwsock32"
 	W32LIBS="-lwsock32"
@@ -1002,7 +1002,7 @@ AC_OUTPUT
 
 # Give some feedback
 echo
-echo   "                Configured for: $PRINTABLE_OS_NAME ($target)"
+echo   "                Configured for: $PRINTABLE_OS_NAME ($host)"
 if test -n "$show_extraasm"; then
   echo "  Extra cpu specific functions:$show_extraasm"
 fi



More information about the Gnupg-devel mailing list