fix cross-compile when libtirpc is used
Subsystems (2)
Hi,
I would like to suggest following patch, which uses pkg-config to find libtirpc headers and libraries.
This allows to cross-compile autofs. The patch was suggested on the buildroot mailinglist, too.
Best regards
Waldemar
From 7582cb88121d1ca4431def9175469e1590e9c29f Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <[email protected]>
Date: Tue, 27 Jun 2017 18:11:56 +0200
Subject: [PATCH] use pkg-config to search for libtirpc to fix
cross-compilation
--- Makefile.conf.in | 3 ++- Makefile.rules | 2 +- aclocal.m4 | 48 ------------------------------------------------ configure.in | 11 +++++++++-- 4 files changed, 12 insertions(+), 52 deletions(-)
Makefile.conf.in +2 -1
@@ -64,7 +64,8 @@ RPCGEN = @PATH_RPCGEN@ RANLIB = @PATH_RANLIB@ # Use libtirpc if requested and available -TIRPCLIB = @TIRPCLIB@ +TIRPCLIB = @TIRPC_LIBS@ +TIRPCCFLAGS = @TIRPC_CFLAGS@ # Use dmalloc for memory debuging DMALLOCLIB = @DMALLOCLIB@
Makefile.rules +1 -1
@@ -46,7 +46,7 @@ CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 LIBS += -lpthread ifdef TIRPCLIB -CFLAGS += -I/usr/include/tirpc +CFLAGS += $(TIRPCCFLAGS) LIBS += $(TIRPCLIB) endif
aclocal.m4 +0 -48
51 lines not on this page · raw message
configure.in +9 -2
@@ -11,6 +11,9 @@ define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl AC_INIT(.autofs-5.1.3) +# for pkg-config/pkconf +m4_include([pkg.m4]) + # # autofs installs by default in /usr #
@@ -124,8 +127,12 @@ AC_SUBST(flagdir) # # Use libtirpc # -AF_WITH_LIBTIRPC() -AC_SUBST(TIRPCLIB) +PKG_PROG_PKG_CONFIG() + +AC_ARG_WITH([libtirpc], AS_HELP_STRING([--with-libtirpc], [Build with the TIRPC library])) +if test "x$with_libtirpc" = "xyes"; then + PKG_CHECK_MODULES([TIRPC],[libtirpc]) +fi # # Optional include dmalloc
Signature · 1 line
2.1.4
Ian Kent
maintainerQuoted 6 lines · Waldemar Brodkorb
Hi,
I would like to suggest following patch, which uses pkg-config to find libtirpc headers and libraries.
This allows to cross-compile autofs. The patch was suggested on the buildroot mailinglist, too.
Where is the patch description?
What happens if a pkg config package is not installed?
And how are WITH_LIBTIRPC and TIRPC_WORKAROUND defined?
Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerQuoted 8 lines · Ian Kent
Quoted 6 lines · Waldemar Brodkorb
Hi,
I would like to suggest following patch, which uses pkg-config to find libtirpc headers and libraries.
This allows to cross-compile autofs. The patch was suggested on the buildroot mailinglist, too.
Quoted 4 lines
Where is the patch description?
What happens if a pkg config package is not installed?And how are
WITH_LIBTIRPCandTIRPC_WORKAROUNDdefined?
And another small detail.
[raven@pluto autofs-dev.git]$ make configure
autoconf
/usr/bin/m4:configure.in:15: cannot open `pkg.m4': No such file or directory
autom4te: /usr/bin/m4 failed with exit status: 1
Makefile:52: recipe for target 'configure' failed
make: *** [configure] Error 1
--
To unsubscribe from this list: send the line "unsubscribe autofs" in