libreplace: fixed the strptime() waf test
authorAndrew Tridgell <tridge@samba.org>
Sun, 22 Aug 2010 21:28:09 +0000 (07:28 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 23 Aug 2010 05:55:38 +0000 (15:55 +1000)
Thanks to Jelmer for pointing this out

lib/replace/wscript

index 9cdfd7f344df125fba1c3ced5058b9b7c9b88ab2..66b0e87d38f01615f5e4f5a765ad09755b16037e 100644 (file)
@@ -202,8 +202,9 @@ def configure(conf):
         conf.DEFINE('HAVE_EPOLL', 1)
 
     if not conf.CHECK_CODE('''#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
-                      #include "$libreplacedir/test/strptime.c"''',
+                      #include "test/strptime.c"''',
                            define='HAVE_STRPTIME',
+                           addmain=False,
                            msg='Checking for working strptime'):
         conf.DEFINE('REPLACE_STRPTIME', 1)
 
@@ -288,13 +289,6 @@ def configure(conf):
                         cflags=conf.env.VISIBILITY_CFLAGS,
                         define='HAVE_VISIBILITY_ATTR')
 
-    if not conf.CHECK_CODE('''#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
-                      #include "$libreplacedir/test/strptime.c"''',
-                           define='HAVE_STRPTIME',
-                           msg='Checking for working strptime'):
-        conf.DEFINE('REPLACE_STRPTIME', 1)
-
-
     # look for a method of finding the list of network interfaces
     for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
         if conf.CHECK_CODE('''