configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)
authorAlexander Barton <alex@barton.de>
Wed, 12 Sep 2012 22:06:08 +0000 (00:06 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 12 Sep 2012 22:06:08 +0000 (00:06 +0200)
See the autoconf manual for details:
http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets

configure.in
src/ngircd/login.c
src/ngircd/ngircd.c
src/portab/portab.h

index b65d1558065b6c533de1cb9bfc72a08c28981757..0f6af2a0a32d1dfb6414089b0db603b8e2e0f5a9 100644 (file)
@@ -19,7 +19,7 @@ AC_INIT([ngIRCd], VERSION_ID,
 
 AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
 AC_CONFIG_HEADER([src/config.h])
-AC_CANONICAL_TARGET
+AC_CANONICAL_HOST
 
 AM_INIT_AUTOMAKE([1.11])
 
@@ -40,9 +40,9 @@ AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
 AH_TEMPLATE([WANT_IPV6], [Define if IPV6 protocol should be enabled])
 AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
 
-AH_TEMPLATE([TARGET_OS], [Target operating system name])
-AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
-AH_TEMPLATE([TARGET_CPU], [Target CPU name])
+AH_TEMPLATE([HOST_OS], [Target operating system name])
+AH_TEMPLATE([HOST_VENDOR], [Target system vendor])
+AH_TEMPLATE([HOST_CPU], [Target CPU name])
 
 # -- C Compiler --
 
@@ -87,7 +87,7 @@ if test "$GCC" = "yes"; then
        GCC_STACK_PROTECT_CC
 fi
 
-case "$target_os" in
+case "$host_os" in
        hpux*)
                # This is HP/UX, we need to define _XOPEN_SOURCE_EXTENDED
                # (tested with HP/UX 11.11)
@@ -538,9 +538,9 @@ AC_ARG_ENABLE(strict-rfc,
 
 # -- Definitions --
 
-AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
-AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
-AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
+AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
+AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
+AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
 
 # Add additional CFLAGS, eventually specified on the command line, but after
 # running this configure script. Useful for "-Werror" for example.
@@ -590,8 +590,7 @@ C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
 M=`eval echo ${mandir}` ; M=`eval echo ${M}`
 D=`eval echo ${docdir}` ; D=`eval echo ${D}`
 
-echo "             Target: ${target}"
-test "$target" != "$host" && echo "               Host: ${host}"
+echo "               Host: ${host}"
 echo "           Compiler: ${CC}"
 test -n "$CFLAGS"      && echo "     Compiler flags: ${CFLAGS}"
 test -n "$CPPFLAGS"    && echo " Preprocessor flags: ${CPPFLAGS}"
index 460fcd1e4c1954e80d946d6ac1a08a0ba9e7722e..d79344b5941bcfa59ab61ff4a0acd49131fb4b48 100644 (file)
@@ -163,8 +163,8 @@ Login_User_PostAuth(CLIENT *Client)
                return false;
        if (!IRC_WriteStrClient
            (Client, RPL_YOURHOST_MSG, Client_ID(Client),
-            Client_ID(Client_ThisServer()), PACKAGE_VERSION, TARGET_CPU,
-            TARGET_VENDOR, TARGET_OS))
+            Client_ID(Client_ThisServer()), PACKAGE_VERSION, HOST_CPU,
+            HOST_VENDOR, HOST_OS))
                return false;
        if (!IRC_WriteStrClient
            (Client, RPL_CREATED_MSG, Client_ID(Client), NGIRCd_StartStr))
index 67bc4df4c0180d8f79f8e4c61cd0a9c22a0bc339..44c4ca79be266dafbd742650952186cec036da11 100644 (file)
@@ -405,11 +405,11 @@ Fill_Version( void )
        if( NGIRCd_VersionAddition[0] )
                strlcat( NGIRCd_VersionAddition, "-", sizeof( NGIRCd_VersionAddition ));
 
-       strlcat( NGIRCd_VersionAddition, TARGET_CPU, sizeof( NGIRCd_VersionAddition ));
+       strlcat( NGIRCd_VersionAddition, HOST_CPU, sizeof( NGIRCd_VersionAddition ));
        strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
-       strlcat( NGIRCd_VersionAddition, TARGET_VENDOR, sizeof( NGIRCd_VersionAddition ));
+       strlcat( NGIRCd_VersionAddition, HOST_VENDOR, sizeof( NGIRCd_VersionAddition ));
        strlcat( NGIRCd_VersionAddition, "/", sizeof( NGIRCd_VersionAddition ));
-       strlcat( NGIRCd_VersionAddition, TARGET_OS, sizeof( NGIRCd_VersionAddition ));
+       strlcat( NGIRCd_VersionAddition, HOST_OS, sizeof( NGIRCd_VersionAddition ));
 
        snprintf(NGIRCd_Version, sizeof NGIRCd_Version, "%s %s-%s",
                 PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_VersionAddition);
index 90f36a0ea0e586e3b64f6aeb762f73ba7a5f4098..1c6e3f852aaa02c5b4cbb398803ba9c114ec35b4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -120,16 +120,16 @@ typedef unsigned char bool;
 
 /* target constants  */
 
-#ifndef TARGET_OS
-#define TARGET_OS "unknown"
+#ifndef HOST_OS
+#define HOST_OS "unknown"
 #endif
 
-#ifndef TARGET_CPU
-#define TARGET_CPU "unknown"
+#ifndef HOST_CPU
+#define HOST_CPU "unknown"
 #endif
 
-#ifndef TARGET_VENDOR
-#define TARGET_VENDOR "unknown"
+#ifndef HOST_VENDOR
+#define HOST_VENDOR "unknown"
 #endif