[cvslog] (2008-07-04 02:41:53 UTC) Module eggdrop1.6: Change committed!

cvslog cvs at tsss.org
Thu Jul 3 20:41:53 CST 2008


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2008-07-04 02:41:53 UTC
Commited by: Tothwolf <tothwolf at techmonkeys.org>

Modified files:
     aclocal.m4 config.h.in configure configure.ac doc/UPDATES1.6
     src/main.h src/compat/snprintf.c

Log message:

Added EGG_APPEND_VAR and EGG_CHECK_ICC autoconf macros to aclocal.m4.

Replaced autoconf 'var="$var <string>"' with EGG_APPEND_VAR macro.

Replaced no_pipe and no_wall variable hacks with a proper test for the Intel C Compiler (icc).

Put '-pipe' in CFLAGS not CC.

Added GPL header to AH_TOP macro in configure.ac for config.h.in.

Removed unused std_args.h header check and HAVE_STD_ARGS_H conditionals.

---------------------- diff included ----------------------
Index: eggdrop1.6/aclocal.m4
diff -u eggdrop1.6/aclocal.m4:1.108 eggdrop1.6/aclocal.m4:1.109
--- eggdrop1.6/aclocal.m4:1.108	Thu Jul  3 20:52:55 2008
+++ eggdrop1.6/aclocal.m4	Thu Jul  3 21:41:42 2008
@@ -16,7 +16,7 @@
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 dnl
-dnl $Id: aclocal.m4,v 1.108 2008-07-04 01:52:55 tothwolf Exp $
+dnl $Id: aclocal.m4,v 1.109 2008-07-04 02:41:42 tothwolf Exp $
 dnl
 
 
@@ -91,6 +91,25 @@
 ])
 
 
+dnl EGG_APPEND_VAR()
+dnl
+dnl Append a non-empty string to a variable
+dnl
+dnl $1 = variable
+dnl $2 = string 
+dnl
+AC_DEFUN([EGG_APPEND_VAR],
+[
+  if test "x$2" != x; then
+    if test "x$$1" = x; then
+      $1="$2"
+    else
+      $1="$$1 $2"
+    fi
+  fi
+])   
+
+
 dnl
 dnl Compiler checks.
 dnl
@@ -132,6 +151,33 @@
 ])
 
 
+dnl EGG_CHECK_ICC()
+dnl
+dnl Check for Intel's C compiler. It attempts to emulate gcc but doesn't
+dnl accept all the standard gcc options.
+dnl
+dnl
+AC_DEFUN([EGG_CHECK_ICC],[
+  AC_CACHE_CHECK([for icc], egg_cv_var_cc_icc, [
+    AC_COMPILE_IFELSE([[
+#if !(defined(__ICC) || defined(__ECC) || defined(__INTEL_COMPILER))
+  "Toto, I've a feeling we're not in Kansas anymore."
+#endif
+    ]], [
+      egg_cv_var_cc_icc="yes"
+    ], [
+      egg_cv_var_cc_icc="no"
+    ])
+  ])
+
+  if test "$egg_cv_var_cc_icc" = yes; then
+    ICC="yes"
+  else
+    ICC="no"
+  fi
+])
+
+
 dnl EGG_CHECK_CCPIPE()
 dnl
 dnl This macro checks whether or not the compiler supports the `-pipe' flag,
@@ -139,7 +185,7 @@
 dnl
 AC_DEFUN([EGG_CHECK_CCPIPE],
 [
-  if test -n "$GCC" && test -z "$no_pipe"; then
+  if test "$GCC" = yes && test "$ICC" = no; then
     AC_CACHE_CHECK([whether the compiler understands -pipe], egg_cv_var_ccpipe, [
         ac_old_CC="$CC"
         CC="$CC -pipe"
@@ -157,7 +203,7 @@
     ])
 
     if test "$egg_cv_var_ccpipe" = yes; then
-      CC="$CC -pipe"
+      EGG_APPEND_VAR(CFLAGS, -pipe)
     fi
   fi
 ])
@@ -169,7 +215,7 @@
 dnl
 AC_DEFUN([EGG_CHECK_CCWALL],
 [
-  if test -n "$GCC" && test -z "$no_wall"; then
+  if test "$GCC" = yes && test "$ICC" = no; then
     AC_CACHE_CHECK([whether the compiler understands -Wall], egg_cv_var_ccwall, [
       ac_old_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -Wall"
@@ -187,7 +233,7 @@
     ])
 
     if test "$egg_cv_var_ccwall" = yes; then
-      CFLAGS="$CFLAGS -Wall"
+      EGG_APPEND_VAR(CFLAGS, -Wall)
     fi
   fi
 ])
@@ -411,7 +457,7 @@
     AC_MSG_CHECKING([for /usr/lib/binmode.o])
     if test -r /usr/lib/binmode.o; then
       AC_MSG_RESULT([yes])
-      LIBS="$LIBS /usr/lib/binmode.o"
+      EGG_APPEND_VAR(LIBS, /usr/lib/binmode.o)
     else
       AC_MSG_RESULT([no])
       AC_MSG_WARN([Make sure the directory Eggdrop is installed into is mounted in binary mode.])
@@ -535,7 +581,7 @@
       fi
       LOAD_METHOD="dyld"
       EGG_DARWIN_BUNDLE
-      MODULE_XLIBS="$BUNDLE $MODULE_XLIBS"
+      EGG_APPEND_VAR(MODULE_XLIBS, $BUNDLE)
     ;;
     *)
       if test -r /mach; then
@@ -1414,7 +1460,7 @@
 
     # Add pthread library to $LIBS if we need it for threaded Tcl
     if test "x$ac_cv_lib_pthread" != x; then
-      LIBS="$ac_cv_lib_pthread $LIBS"
+      EGG_APPEND_VAR(LIBS, $ac_cv_lib_pthread)
     fi
   else
     AC_MSG_RESULT([no])
Index: eggdrop1.6/config.h.in
diff -u eggdrop1.6/config.h.in:1.48 eggdrop1.6/config.h.in:1.49
--- eggdrop1.6/config.h.in:1.48	Wed Jun 18 01:03:20 2008
+++ eggdrop1.6/config.h.in	Thu Jul  3 21:41:42 2008
@@ -1,5 +1,24 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/*
+ * Copyright (C) 1997 Robey Pointer
+ * Copyright (C) 1999 - 2008 Eggheads Development Team
+ *
+ * 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 the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
 #ifndef _EGG_CONFIG_H
 #define _EGG_CONFIG_H
 
@@ -188,9 +207,6 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define to 1 if you have the <std_args.h> header file. */
-#undef HAVE_STD_ARGS_H
-
 /* Define to 1 if you have the `strcasecmp' function. */
 #undef HAVE_STRCASECMP
 
Index: eggdrop1.6/configure
diff -u eggdrop1.6/configure:1.156 eggdrop1.6/configure:1.157
--- eggdrop1.6/configure:1.156	Thu Jul  3 20:52:55 2008
+++ eggdrop1.6/configure	Thu Jul  3 21:41:42 2008
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.30 .
+# From configure.ac Revision: 1.31 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for Eggdrop 1.6.20.
 #
@@ -3673,7 +3673,62 @@
 
 # Check C compiler characteristics.
 
-  if test -n "$GCC" && test -z "$no_pipe"; then
+  { echo "$as_me:$LINENO: checking for icc" >&5
+echo $ECHO_N "checking for icc... $ECHO_C" >&6; }
+if test "${egg_cv_var_cc_icc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    cat >conftest.$ac_ext <<_ACEOF
+
+#if !(defined(__ICC) || defined(__ECC) || defined(__INTEL_COMPILER))
+  "Toto, I've a feeling we're not in Kansas anymore."
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+      egg_cv_var_cc_icc="yes"
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+      egg_cv_var_cc_icc="no"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $egg_cv_var_cc_icc" >&5
+echo "${ECHO_T}$egg_cv_var_cc_icc" >&6; }
+
+  if test "$egg_cv_var_cc_icc" = yes; then
+    ICC="yes"
+  else
+    ICC="no"
+  fi
+
+
+  if test "$GCC" = yes && test "$ICC" = no; then
     { echo "$as_me:$LINENO: checking whether the compiler understands -pipe" >&5
 echo $ECHO_N "checking whether the compiler understands -pipe... $ECHO_C" >&6; }
 if test "${egg_cv_var_ccpipe+set}" = set; then
@@ -3727,12 +3782,20 @@
 echo "${ECHO_T}$egg_cv_var_ccpipe" >&6; }
 
     if test "$egg_cv_var_ccpipe" = yes; then
-      CC="$CC -pipe"
+
+  if test "x-pipe" != x; then
+    if test "x$CFLAGS" = x; then
+      CFLAGS="-pipe"
+    else
+      CFLAGS="$CFLAGS -pipe"
     fi
   fi
 
+    fi
+  fi
 
-  if test -n "$GCC" && test -z "$no_wall"; then
+
+  if test "$GCC" = yes && test "$ICC" = no; then
     { echo "$as_me:$LINENO: checking whether the compiler understands -Wall" >&5
 echo $ECHO_N "checking whether the compiler understands -Wall... $ECHO_C" >&6; }
 if test "${egg_cv_var_ccwall+set}" = set; then
@@ -3786,10 +3849,18 @@
 echo "${ECHO_T}$egg_cv_var_ccwall" >&6; }
 
     if test "$egg_cv_var_ccwall" = yes; then
+
+  if test "x-Wall" != x; then
+    if test "x$CFLAGS" = x; then
+      CFLAGS="-Wall"
+    else
       CFLAGS="$CFLAGS -Wall"
     fi
   fi
 
+    fi
+  fi
+
 
 
 # Check for executable extension.
@@ -5601,7 +5672,15 @@
 EOF
   fi
 
-      MODULE_XLIBS="$BUNDLE $MODULE_XLIBS"
+
+  if test "x$BUNDLE" != x; then
+    if test "x$MODULE_XLIBS" = x; then
+      MODULE_XLIBS="$BUNDLE"
+    else
+      MODULE_XLIBS="$MODULE_XLIBS $BUNDLE"
+    fi
+  fi
+
     ;;
     *)
       if test -r /mach; then
@@ -5829,7 +5908,15 @@
     if test -r /usr/lib/binmode.o; then
       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
+
+  if test "x/usr/lib/binmode.o" != x; then
+    if test "x$LIBS" = x; then
+      LIBS="/usr/lib/binmode.o"
+    else
       LIBS="$LIBS /usr/lib/binmode.o"
+    fi
+  fi
+
     else
       { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
@@ -6317,8 +6404,7 @@
 
 
 
-
-for ac_header in arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stdio.h std_args.h stdarg.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h
+for ac_header in arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stdio.h stdarg.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -10650,7 +10736,15 @@
 
     # Add pthread library to $LIBS if we need it for threaded Tcl
     if test "x$ac_cv_lib_pthread" != x; then
-      LIBS="$ac_cv_lib_pthread $LIBS"
+
+  if test "x$ac_cv_lib_pthread" != x; then
+    if test "x$LIBS" = x; then
+      LIBS="$ac_cv_lib_pthread"
+    else
+      LIBS="$LIBS $ac_cv_lib_pthread"
+    fi
+  fi
+
     fi
   else
     { echo "$as_me:$LINENO: result: no" >&5
Index: eggdrop1.6/configure.ac
diff -u eggdrop1.6/configure.ac:1.31 eggdrop1.6/configure.ac:1.32
--- eggdrop1.6/configure.ac:1.31	Thu Jul  3 20:52:55 2008
+++ eggdrop1.6/configure.ac	Thu Jul  3 21:41:42 2008
@@ -1,18 +1,37 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.31 2008-07-04 01:52:55 tothwolf Exp $
+dnl $Id: configure.ac,v 1.32 2008-07-04 02:41:42 tothwolf Exp $
 
 AC_PREREQ(2.59)
 AC_INIT([Eggdrop],[1.6.20],[bugs at eggheads.org])
 AC_COPYRIGHT([Copyright (C) 1999 - 2008 Eggheads Development Team])
-AC_REVISION($Revision: 1.31 $)
+AC_REVISION($Revision: 1.32 $)
 AC_CONFIG_SRCDIR(src/eggdrop.h)
 AC_CONFIG_AUX_DIR(misc)
 AC_CONFIG_HEADER(config.h)
 AC_PREFIX_DEFAULT([\${HOME}/eggdrop])
 
 dnl config.h stuff
-AH_TOP([#ifndef _EGG_CONFIG_H
+AH_TOP([/*
+ * Copyright (C) 1997 Robey Pointer
+ * Copyright (C) 1999 - 2008 Eggheads Development Team
+ *
+ * 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 the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef _EGG_CONFIG_H
 #define _EGG_CONFIG_H])
 AH_BOTTOM([#endif /* !_EGG_CONFIG_H */])
 
@@ -31,6 +50,7 @@
 AC_MINIX
 
 # Check C compiler characteristics.
+EGG_CHECK_ICC
 EGG_CHECK_CCPIPE
 EGG_CHECK_CCWALL
 
@@ -70,7 +90,7 @@
 EGG_HEADER_STDC
 AC_HEADER_DIRENT
 AC_HEADER_TIME
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stdio.h std_args.h stdarg.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h locale.h netdb.h netinet/in.h stdio.h stdarg.h stddef.h sys/file.h sys/param.h sys/rusage.h sys/select.h sys/socket.h sys/time.h unistd.h wchar.h])
 
 
 # Checks for typedefs, structures, and compiler characteristics.
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.662 eggdrop1.6/doc/UPDATES1.6:1.663
--- eggdrop1.6/doc/UPDATES1.6:1.662	Thu Jul  3 20:52:55 2008
+++ eggdrop1.6/doc/UPDATES1.6	Thu Jul  3 21:41:43 2008
@@ -1,4 +1,4 @@
-$Id: UPDATES1.6,v 1.662 2008-07-04 01:52:55 tothwolf Exp $
+$Id: UPDATES1.6,v 1.663 2008-07-04 02:41:43 tothwolf Exp $
 
 Eggdrop Changes (since v1.6.0)
     _____________________________________________________________________
@@ -12,6 +12,15 @@
 
 
   1.6.20:
+    - Added EGG_APPEND_VAR and EGG_CHECK_ICC autoconf macros to aclocal.m4.
+    - Replaced autoconf 'var="$var <string>"' with EGG_APPEND_VAR macro.
+    - Replaced no_pipe and no_wall variable hacks with a proper test for the
+      Intel C Compiler (icc).
+    - Put '-pipe' in CFLAGS not CC.
+    - Added GPL header to AH_TOP macro in configure.ac for config.h.in.
+    - Removed unused std_args.h header check and HAVE_STD_ARGS_H conditionals.
+    * Patch by: Tothwolf
+
     - Refactored root Makefile.in variables.
     - Removed unnecessary '-g' flag from LD variables (-g is ignored).
     - Renamed DEBCFLAGS to DEBCFLGS
Index: eggdrop1.6/src/compat/snprintf.c
diff -u eggdrop1.6/src/compat/snprintf.c:1.25 eggdrop1.6/src/compat/snprintf.c:1.26
--- eggdrop1.6/src/compat/snprintf.c:1.25	Sat Feb 16 15:41:05 2008
+++ eggdrop1.6/src/compat/snprintf.c	Thu Jul  3 21:41:43 2008
@@ -1,7 +1,7 @@
 /*
  * snprintf.c - a portable implementation of snprintf and vsnprintf
  *
- * $Id: snprintf.c,v 1.25 2008-02-16 21:41:05 guppy Exp $
+ * $Id: snprintf.c,v 1.26 2008-07-04 02:41:43 tothwolf Exp $
  */
 /*
  * Portions Copyright (C) 2000 - 2008 Eggheads Development Team
@@ -93,10 +93,6 @@
 #if defined(__STDC__)
 #  ifdef HAVE_STDARG_H
 #    include <stdarg.h>
-#  else
-#    ifdef HAVE_STD_ARGS_H
-#      include <std_args.h>
-#    endif
 #  endif
 #  define HAVE_STDARGS          /* let's hope that works everywhere (mj) */
 #  define VA_LOCAL_DECL va_list ap
Index: eggdrop1.6/src/main.h
diff -u eggdrop1.6/src/main.h:1.36 eggdrop1.6/src/main.h:1.37
--- eggdrop1.6/src/main.h:1.36	Sat Feb 16 15:41:03 2008
+++ eggdrop1.6/src/main.h	Thu Jul  3 21:41:43 2008
@@ -2,7 +2,7 @@
  * main.h
  *   include file to include most other include files
  *
- * $Id: main.h,v 1.36 2008-02-16 21:41:03 guppy Exp $
+ * $Id: main.h,v 1.37 2008-07-04 02:41:43 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -62,10 +62,6 @@
 #if defined(USE_TCL_VARARGS) && (defined(__STDC__) || defined(HAS_STDARG))
 #  ifdef HAVE_STDARG_H
 #    include <stdarg.h>
-#  else
-#    ifdef HAVE_STD_ARGS_H
-#      include <std_args.h>
-#    endif
 #  endif
 #  define EGG_VARARGS(type, name) (type name, ...)
 #  define EGG_VARARGS_DEF(type, name) (type name, ...)
----------------------- End of diff -----------------------



More information about the Changes mailing list