repo: ngircd
action: commit
revision: 
path_from: 
revision_from: f73e403ae59fc4a8d5d6e55523ff878ab3e5ef72:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit f73e403ae59fc4a8d5d6e55523ff878ab3e5ef72
Author: Alexander Barton 
Date:   Wed Apr 24 13:33:56 2002 +0000

    - Test auf POSIX Regular-Expression-Funktionen eingebaut.

diff --git a/configure.in b/configure.in
index a6f702e52e8d3f3381f427149b1fc699b44d57b3..
index ..6cd92d8e03e8348cbda35683990bb9a97c265ffd 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,7 @@
 # Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
 # der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
 #
-# $Id: configure.in,v 1.43 2002/04/02 18:17:38 alex Exp $
+# $Id: configure.in,v 1.44 2002/04/24 13:33:56 alex Exp $
 #

 # -- Initialisierung --
@@ -27,6 +27,7 @@ AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
 AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
 AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
 AH_TEMPLATE([USE_SYSLOG], [Define if syslog should be used for logging])
+AH_TEMPLATE([REGEX], [Define if POSIX regular expression functions are available])

 AH_TEMPLATE([TARGET_OS], [Target operating system name])
 AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
@@ -51,13 +52,15 @@ AC_HEADER_STDC

 AC_HEADER_TIME

-AC_CHECK_HEADERS(arpa/inet.h)
-
 AC_CHECK_HEADERS([ \
 	errno.h fcntl.h netdb.h netinet/in.h stdlib.h string.h \
 	sys/socket.h sys/time.h sys/wait.h unistd.h \
 	],,AC_MSG_ERROR([required C header missing!]))

+AC_CHECK_HEADERS(arpa/inet.h)
+
+AC_CHECK_HEADERS(regex.h,regex_h_ok=1)
+
 # -- Datentypen --

 AC_MSG_CHECKING(whether socklen_t exists)
@@ -89,6 +92,8 @@ AC_CHECK_FUNCS([ \

 AC_CHECK_FUNCS(inet_aton)

+AC_CHECK_FUNCS(regcomp,regcomp_ok=1)
+
 AC_CHECK_FUNCS(sigaction)

 # -- Konfigurationsoptionen --
@@ -146,6 +151,18 @@ AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
 AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
 AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )

+if test `uname` = "A/UX"; then
+	# unter A/UX sollte _POSIX_SOURCE definiert sein.
+	AC_MSG_RESULT([detected A/UX, defining _POSIX_SOURCE])
+	CFLAGS="$CFLAGS -D_POSIX_SOURCE"
+fi
+
+if test "$regcomp_ok" -eq 1 -a "$regex_h_ok" -eq 1; then
+	# POSIX Regular Expression Library ist verfuegbar
+	AC_MSG_RESULT([detected POSIX regular expression library])
+	AC_DEFINE(REGEX)
+fi
+
 # -- Variablen --

 if test "$GCC" = "yes"; then
@@ -154,12 +171,6 @@ fi

 CFLAGS="$CFLAGS -DSYSCONFDIR='\"\$(sysconfdir)\"'"

-if test `uname` = "A/UX"; then
-	# unter A/UX sollte _POSIX_SOURCE definiert sein.
-	AC_MSG_RESULT([detected A/UX, defining _POSIX_SOURCE])
-	CFLAGS="$CFLAGS -D_POSIX_SOURCE"
-fi
-
 # -- Ausgabe --

 AC_OUTPUT([ \
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index 78ffd9a00f029d5e84b3feafd4d7cdd84f53fb99..
index ..ecc9d332a1a77675b5889497366e68c4c8b3d955 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: ngircd.c,v 1.43 2002/04/04 13:03:55 alex Exp $
+ * $Id: ngircd.c,v 1.44 2002/04/24 13:33:56 alex Exp $
  *
  * ngircd.c: Hier beginnt alles ;-)
  */
@@ -311,6 +311,10 @@ GLOBAL CHAR *NGIRCd_VersionAddition( VOID )
 	if( txt[0] ) strcat( txt, "+" );
 	strcat( txt, "SYSLOG" );
 #endif
+#ifdef REGEX
+	if( txt[0] ) strcat( txt, "+" );
+	strcat( txt, "REGEX" );
+#endif
 #ifdef STRICT_RFC
 	if( txt[0] ) strcat( txt, "+" );
 	strcat( txt, "RFC" );

-----END OF PAGE-----