summaryrefslogtreecommitdiff
path: root/package/libtirpc/patches/patch-configure_ac
blob: 659bdad8c53336c0c45059efde044402517fe0e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- libtirpc-1.0.1.orig/configure.ac	2015-10-30 16:15:14.000000000 +0100
+++ libtirpc-1.0.1/configure.ac	2015-11-29 16:38:38.817971632 +0100
@@ -89,7 +89,19 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h li
 AC_CHECK_LIB([pthread], [pthread_create])
 AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
 
-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
+AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
+
+AC_MSG_CHECKING([for a C compiler for build tools])
+if test $cross_compiling = yes; then
+   AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
+else
+   CC_FOR_BUILD=$CC
+fi
+AC_MSG_RESULT([$CC_FOR_BUILD])
+AC_SUBST(CC_FOR_BUILD)
+
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile rpcgen/Makefile])
+
 AC_OUTPUT(libtirpc.pc)