summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-28 17:05:30 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:13 +1000
commitb9aa63887c005971b1b812893d6c1bbc50ea21b2 (patch)
treea5e73d210538ec5b12019170cff367dc144d3d16 /lib
parentbfbf43cc36ab360b34b49d7e07c2f594e2b7e7c9 (diff)
downloadsamba-b9aa63887c005971b1b812893d6c1bbc50ea21b2.tar.gz
samba-b9aa63887c005971b1b812893d6c1bbc50ea21b2.tar.bz2
samba-b9aa63887c005971b1b812893d6c1bbc50ea21b2.zip
s4-waf: cleanup use of LIBPOPT vs popt dependency
Diffstat (limited to 'lib')
-rw-r--r--lib/popt/wscript26
-rw-r--r--lib/replace/wscript3
2 files changed, 11 insertions, 18 deletions
diff --git a/lib/popt/wscript b/lib/popt/wscript
index 88eed81c92..425402ebe7 100644
--- a/lib/popt/wscript
+++ b/lib/popt/wscript
@@ -2,23 +2,17 @@
import Options
-def set_options(opt):
- opt.add_option('--with-included-popt',
- help=("use bundled popt library, not from system"),
- action="store_true", dest='INCLUDED_POPT', default=False)
-
def configure(conf):
conf.CHECK_HEADERS('float.h')
- if not Options.options.INCLUDED_POPT:
- if conf.CHECK_FUNCS_IN('poptGetContext', 'popt', headers='popt.h'):
- conf.DEFINE('HAVE_SYSTEM_POPT', 1)
+
+ if conf.CHECK_BUNDLED_SYSTEM('popt', checkfunctions='poptGetContext', headers='popt.h'):
+ conf.define('USING_SYSTEM_POPT', 1)
def build(bld):
- if not bld.CONFIG_SET('HAVE_SYSTEM_POPT'):
- bld.SAMBA_SUBSYSTEM('LIBPOPT',
- source='findme.c popt.c poptconfig.c popthelp.c poptparse.c',
- cflags='-DDBL_EPSILON=__DBL_EPSILON__'
- )
- bld.TARGET_ALIAS('LIBPOPT', 'popt')
- else:
- bld.TARGET_ALIAS('popt', 'LIBPOPT')
+ if bld.CONFIG_SET('USING_SYSTEM_POPT'):
+ return
+
+ bld.SAMBA_LIBRARY('popt',
+ source='findme.c popt.c poptconfig.c popthelp.c poptparse.c',
+ cflags='-DDBL_EPSILON=__DBL_EPSILON__'
+ )
diff --git a/lib/replace/wscript b/lib/replace/wscript
index d5f2b0dce9..134cb76f49 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -40,7 +40,7 @@ def configure(conf):
conf.CHECK_HEADERS('windows.h winsock2.h ws2tcpip.h')
conf.CHECK_HEADERS('libintl.h errno.h')
conf.CHECK_HEADERS('gcrypt.h getopt.h iconv.h')
- conf.CHECK_HEADERS('sys/inotify.h memory.h nss.h popt.h sasl/sasl.h')
+ conf.CHECK_HEADERS('sys/inotify.h memory.h nss.h sasl/sasl.h')
conf.CHECK_HEADERS('security/pam_appl.h sys/inotify.h zlib.h asm/unistd.h')
conf.CHECK_HEADERS('aio.h sys/unistd.h rpc/rpc.h rpc/nettype.h alloca.h float.h')
@@ -127,7 +127,6 @@ def configure(conf):
conf.CHECK_FUNCS_IN('dlopen dlsym dlerror dlclose', 'dl',
checklibc=True, headers='dlfcn.h dl.h')
- conf.CHECK_FUNCS_IN('poptGetContext', 'popt')
conf.CHECK_FUNCS_IN('fdatasync', 'rt', checklibc=True)