From: des Date: Tue, 4 Apr 2006 10:35:49 +0000 (+0000) Subject: I can't get AM_CONDITIONAL to work properly, so use a bigger hammer. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ecd0741e7e4fc5b8ed584300e32c9a611f1a0f2;p=varnish I can't get AM_CONDITIONAL to work properly, so use a bigger hammer. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@117 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index 33148721..bf4f81c8 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -61,9 +61,7 @@ AC_CHECK_FUNCS([strerror]) AC_FUNC_STRERROR_R AC_CHECK_FUNCS([socket]) AC_CHECK_FUNCS([strlcat]) -AM_CONDITIONAL(HAVE_STRLCAT, test x$ac_strlcat = xtrue) AC_CHECK_FUNCS([strlcpy]) -AM_CONDITIONAL(HAVE_STRLCPY, test x$ac_strlcpy = xtrue) AC_CONFIG_FILES([ Makefile diff --git a/varnish-cache/lib/libcompat/Makefile.am b/varnish-cache/lib/libcompat/Makefile.am index 349c0b7d..3dfb5858 100644 --- a/varnish-cache/lib/libcompat/Makefile.am +++ b/varnish-cache/lib/libcompat/Makefile.am @@ -4,12 +4,6 @@ INCLUDES = -I$(top_srcdir)/include lib_LIBRARIES = libcompat.a -libcompat_a_SOURCES = - -if !HAVE_STRLCAT -libcompat_a_SOURCES += strlcat.c -endif - -if !HAVE_STRLCPY -libcompat_a_SOURCES += strlcpy.c -endif +libcompat_a_SOURCES = \ + strlcat.c \ + strlcpy.c diff --git a/varnish-cache/lib/libcompat/strlcat.c b/varnish-cache/lib/libcompat/strlcat.c index d4003c82..61aed920 100644 --- a/varnish-cache/lib/libcompat/strlcat.c +++ b/varnish-cache/lib/libcompat/strlcat.c @@ -23,6 +23,7 @@ #include "config.h" #include "compat.h" +#ifndef HAVE_STRLCAT /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters @@ -57,3 +58,4 @@ strlcat(char *dst, const char *src, size_t siz) return(dlen + (s - src)); /* count does not include NUL */ } +#endif diff --git a/varnish-cache/lib/libcompat/strlcpy.c b/varnish-cache/lib/libcompat/strlcpy.c index 963dd5ab..d167e45c 100644 --- a/varnish-cache/lib/libcompat/strlcpy.c +++ b/varnish-cache/lib/libcompat/strlcpy.c @@ -23,6 +23,7 @@ #include "config.h" #include "compat.h" +#ifndef HAVE_STRLCPY /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). @@ -53,3 +54,4 @@ strlcpy(char *dst, const char *src, size_t siz) return(s - src - 1); /* count does not include NUL */ } +#endif