Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-05-13 02:03:44 UTC

Modified files:
     ChangeLog configure.in ircd/ircd_crypt_native.c

Log message:

Simplify CFLAGS handling in configure and expose crypt() on NetBSD

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.631 ircu2.10/ChangeLog:1.632
--- ircu2.10/ChangeLog:1.631    Tue May 10 21:29:41 2005
+++ ircu2.10/ChangeLog  Thu May 12 19:03:23 2005
@@ -1,3 +1,13 @@
+2005-05-12  Michael Poole <[EMAIL PROTECTED]>
+
+       * configure.in: Do not try to outsmart the default CFLAGS.
+       Simply add parameters explicitly requested by the user.
+
+       * configure: Regenerate.
+
+       * ircd/ircd_crypt_native.c: Use _XOPEN_SOURCE 600 (which is
+       used in os_generic.c) to get crypt() on NetBSD.
+
 2005-05-11  Kevin L. Mitchell  <[EMAIL PROTECTED]>
 
        * ircd/ircd.c: if debugging is enabled (both DEBUGMODE defined and
Index: ircu2.10/configure.in
diff -u ircu2.10/configure.in:1.32 ircu2.10/configure.in:1.33
--- ircu2.10/configure.in:1.32  Tue Apr 19 18:24:38 2005
+++ ircu2.10/configure.in       Thu May 12 19:03:33 2005
@@ -19,7 +19,7 @@
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 dnl
-dnl $Id: configure.in,v 1.32 2005/04/20 01:24:38 entrope Exp $
+dnl $Id: configure.in,v 1.33 2005/05/13 02:03:33 entrope Exp $
 
 dnl Make sure we are in the correct directory (someone could have run
 dnl 'configure' with a wrong '--srcdir').
@@ -52,54 +52,6 @@
 
 dnl ANSIfy the C compiler whenever possible.
 AM_PROG_CC_STDC
-dnl Allow specification of optimization level.
-AC_ARG_WITH([optimization],
-    AS_HELP_STRING([--with-optimization=[-O2]], [Explicitly set the compiler 
optimization flags (default: -O3)]),
-    [unet_cv_optimization=$withval],
-    [unet_cv_optimization='-O3'])
-AC_CACHE_CHECK([optimization level], [unet_cv_optimization], 
[unet_cv_optimization='-O3'])
-if test "x$unet_cv_optimization" = "xno" ; then
-    unet_cv_optimization=""
-fi
-if test x"$CFLAGS" != x; then
-    CFLAGS=`echo "$CFLAGS" | sed -e s/-O2/$unet_cv_optimization/`
-fi
-dnl Notice the -g flag and deal accordingly
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-g//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -g was already there, force symbols to be enabled
-    unet_cv_enable_symbols=yes
-fi
-dnl Notice the -pg flag and deal accordingly
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-pg//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -pg was already there, force profiling to be enabled
-    unet_cv_enable_profile=yes
-fi
-dnl Notice the -Wall flag and deal accordingly
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-Wall//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -Wall was already there, force warnings to be enabled
-    unet_cv_enable_warnings=yes
-fi
-dnl Notice the -pedantic flag and deal accordingly
-if test x"$CFLAGS" != x; then
-    unet_old_cflags=$CFLAGS
-    CFLAGS=`echo "$CFLAGS" | sed -e 's/-pedantic//g'`
-fi
-if test x"$CFLAGS" != x"$unet_old_cflags"; then
-    # If -pedantic was already there, force pedatic to be enabled
-    unet_cv_enable_pedantic=yes
-fi
 
 dnl Checks for libraries.
 
@@ -308,23 +260,10 @@
     AC_DEFINE([NDEBUG], 1, [Disable assertions])
 fi
 
-dnl Check for --enable-symbols
-AC_MSG_CHECKING([whether to enable debugging symbols])
-AC_ARG_ENABLE([symbols],
-[  --disable-symbols       Disable debugging symbols (remove -g from CFLAGS)],
-[unet_cv_enable_symbols=$enable_symbols],
-[AC_CACHE_VAL(unet_cv_enable_symbols,
-[unet_cv_enable_symbols=yes])])
-AC_MSG_RESULT([$unet_cv_enable_symbols])
-
-if test x"$unet_cv_enable_symbols" = xyes; then
-    CFLAGS="-g $CFLAGS"
-fi
-
 dnl Now check for --enable-profile
 AC_MSG_CHECKING([whether to enable profiling support (gprof)])
 AC_ARG_ENABLE([profile],
-[  --enable-profile        Enable profiling support (add -pg to CFLAGS)],
+[  --enable-profile        Enable profiling support (add -pg to CFLAGS and 
LDFLAGS)],
 [unet_cv_enable_profile=$enable_profile],
 [AC_CACHE_VAL(unet_cv_enable_profile,
 [unet_cv_enable_profile=no])])
Index: ircu2.10/ircd/ircd_crypt_native.c
diff -u ircu2.10/ircd/ircd_crypt_native.c:1.6 
ircu2.10/ircd/ircd_crypt_native.c:1.7
--- ircu2.10/ircd/ircd_crypt_native.c:1.6       Sun Mar 20 08:06:17 2005
+++ ircu2.10/ircd/ircd_crypt_native.c   Thu May 12 19:03:33 2005
@@ -19,14 +19,13 @@
 /**
  * @file
  * @brief Native crypt() function routines
- * @version $Id: ircd_crypt_native.c,v 1.6 2005/03/20 16:06:17 entrope Exp $
+ * @version $Id: ircd_crypt_native.c,v 1.7 2005/05/13 02:03:33 entrope Exp $
  * 
  * Routines for handling passwords encrypted with the system's native crypt()
  * function (typically a DES encryption routine, but can be anything nowadays).
  * 
  */
-#define _XOPEN_SOURCE
-#define _XOPEN_VERSION 4
+#define _XOPEN_SOURCE 600
 
 #include "config.h"
 #include "ircd_crypt.h"
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to