about summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2005-03-20 17:23:36 +0000
committerAlexander Barton <alex@barton.de>2005-03-20 17:23:36 +0000
commita8221533093e480223b12e83ba4aefb8d1a38876 (patch)
tree3b6f61e64a239f297027ad63daf79be094481e81 /configure.in
parent49f5a4d454099f95d1953af381f76bff0ea7e21a (diff)
downloadngircd-a8221533093e480223b12e83ba4aefb8d1a38876.tar.gz
ngircd-a8221533093e480223b12e83ba4aefb8d1a38876.zip
Enhanced configure script: now you can pass an (optional) search path
to all --with-XXX parameters, e. g. "--with-ident=/opt/ident".
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in43
1 files changed, 34 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index 695a42cc..62617bdd 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
 #
 # ngIRCd -- The Next Generation IRC Daemon
-# Copyright (c)2001-2004 Alexander Barton <alex@barton.de>
+# Copyright (c)2001-2005 Alexander Barton <alex@barton.de>
 #
 # 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
@@ -8,7 +8,7 @@
 # (at your option) any later version.
 # Please read the file COPYING, README and AUTHORS for more information.
 #
-# $Id: configure.in,v 1.106 2005/03/19 18:43:48 fw Exp $
+# $Id: configure.in,v 1.107 2005/03/20 17:23:36 alex Exp $
 #
 
 # -- Initialisation --
@@ -132,7 +132,12 @@ AC_CHECK_FUNCS(select,[AC_CHECK_HEADERS(sys/select.h)],
 x_syslog_on=no
 AC_ARG_WITH(syslog,
 	[  --without-syslog        disable syslog (autodetected by default)],
-	[	if test "$withval" = "yes"; then
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
 			AC_CHECK_LIB(be, syslog)
 			AC_CHECK_FUNCS(syslog, x_syslog_on=yes,
 				AC_MSG_ERROR([Can't enable syslog!])
@@ -152,7 +157,12 @@ fi
 x_zlib_on=no
 AC_ARG_WITH(zlib,
 	[  --without-zlib          disable zlib compression (autodetected by default)],
-	[	if test "$withval" = "yes"; then
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
 			AC_CHECK_LIB(z, deflate)
 			AC_CHECK_FUNCS(deflate, x_zlib_on=yes,
 				AC_MSG_ERROR([Can't enable zlib!])
@@ -171,8 +181,13 @@ fi
 x_tcpwrap_on=no
 AC_ARG_WITH(tcp-wrappers,
 	[  --with-tcp-wrappers     enable TCP wrappers support],
-	[	if test "$withval" = "yes"; then
-			AC_CHECK_LIB(wrap, tcpd_warn)
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
+			AC_CHECK_LIB(wrap, hosts_access)
 			AC_MSG_CHECKING(for hosts_access)
 			AC_TRY_LINK([
 				#include <tcpd.h>
@@ -194,7 +209,12 @@ AC_ARG_WITH(tcp-wrappers,
 x_rendezvous_on=no
 AC_ARG_WITH(rendezvous,
 	[  --with-rendezvous       enable support for "Rendezvous"],
-	[	if test "$withval" = "yes"; then
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
 			AC_CHECK_FUNCS(DNSServiceRegistrationCreate, x_rendezvous_on=osx,
 			[
 				AC_CHECK_LIB(pthread, pthread_mutexattr_init)
@@ -219,7 +239,7 @@ if test "$x_rendezvous_on" = "howl"; then
 		if test -f "$dir/rendezvous/rendezvous.h"; then
 			if test "$dir" != "/usr/local/include" -a \
 			 "$dir" != "/usr/include"; then
-				CFLAGS="$CFLAGS -I$dir"
+				CFLAGS="-I$dir $CFLAGS"
 				CPPFLAGS="-I$dir $CPPFLAGS"
 			fi
 			AC_MSG_RESULT(yes)
@@ -236,7 +256,12 @@ fi
 x_identauth_on=no
 AC_ARG_WITH(ident,
 	[  --with-ident            enable "IDENT" ("AUTH") protocol support],
-	[	if test "$withval" = "yes"; then
+	[	if test "$withval" != "no"; then
+			if test "$withval" != "yes"; then
+				CFLAGS="-I$withval/include $CFLAGS"
+				CPPFLAGS="-I$withval/include $CPPFLAGS"
+				LDFLAGS="-L$withval/lib $LDFLAGS"
+			fi
 			AC_CHECK_LIB(ident, ident_id)
 			AC_CHECK_FUNCS(ident_id, x_identauth_on=yes,
 				AC_MSG_ERROR([Can't enable IDENT support!])