[PATCH xserver] configure: Tell AC_REPLACE_FUNCS where to find replacements

Alan Coopersmith alan.coopersmith at oracle.com
Wed Jun 29 20:06:27 UTC 2016


On 06/29/16 11:07 AM, Adam Jackson wrote:
> Fixes weird link errors of the form:
>
>        CCLD     Xvfb
>      ../../Xext/.libs/libXext.a(xvmc.o): In function `xf86XvMCRegisterDRInfo':
>      /home/ajax/git/xserver/Xext/xvmc.c:828: undefined reference to `strlcpy'
>      /home/ajax/git/xserver/Xext/xvmc.c:829: undefined reference to `strlcpy'
>      ../../os/os.O: In function `siHostnameAddrMatch':
>      /home/ajax/git/xserver/os/access.c:1821: undefined reference to `strlcpy'
>      ../../os/os.O: In function `AuthAudit':
>      /home/ajax/git/xserver/os/connection.c:555: undefined reference to `strlcpy'
>      /home/ajax/git/xserver/os/connection.c:574: undefined reference to `strlcpy'
>      ../../os/os.O:/home/ajax/git/xserver/os/log.c:972: more undefined references to `strlcpy' follow
>      collect2: error: ld returned 1 exit status
>      Makefile:688: recipe for target 'Xvfb' failed
>      make[3]: *** [Xvfb] Error 1
>      Makefile:749: recipe for target 'all-recursive' failed
>      make[2]: *** [all-recursive] Error 1
>      Makefile:608: recipe for target 'all-recursive' failed
>      make[1]: *** [all-recursive] Error 1
>      Makefile:776: recipe for target 'all-recursive' failed
>      make: *** [all-recursive] Error 1
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>   configure.ac | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/configure.ac b/configure.ac
> index f14e088..560d382 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -220,6 +220,7 @@ AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
>   	getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \
>   	mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \
>   	walkcontext setitimer])
> +AC_CONFIG_LIBOBJ_DIR([os])
>   AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup])
>
>   AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include <errno.h>]])
>

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list