Merge tag 'upstream/4.0.5+dfsg1' into samba_4.0_ivo
[abartlet/samba-debian.git] / lib / replace / strptime.m4
index b1a56b4aab17cc8f094edb65ecab5b16b81c48de..8ac22f63426a4662d7b90bce2e128b2504612039 100644 (file)
@@ -1,3 +1,5 @@
+AC_CHECK_FUNCS(strptime)
+AC_CHECK_DECLS(strptime, [], [], [#include <time.h>])
 AC_CACHE_CHECK([whether strptime is available and works],libreplace_cv_STRPTIME_OK,[
        AC_TRY_RUN([
                #define LIBREPLACE_CONFIGURE_TEST_STRPTIME
@@ -8,6 +10,7 @@ AC_CACHE_CHECK([whether strptime is available and works],libreplace_cv_STRPTIME_
                [libreplace_cv_STRPTIME_OK="assuming not"])
 ])
 if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then
-        AC_DEFINE(REPLACE_STRPTIME,1,[Whether strptime should be replaced])
         LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/strptime.o"
+else
+        AC_DEFINE(HAVE_WORKING_STRPTIME,1,[Whether strptime is working correct])
 fi