mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
libnfs: add libnfs buildsystem fixes
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
7ddb548d68
commit
61fb1ca698
@ -33,6 +33,7 @@ cd $PKG_BUILD
|
|||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--disable-examples \
|
--disable-examples \
|
||||||
--enable-tirpc \
|
--enable-tirpc \
|
||||||
|
--with-tirpcinclude="$SYSROOT_PREFIX/usr/include/tirpc" \
|
||||||
|
|
||||||
make
|
make
|
||||||
$MAKEINSTALL
|
$MAKEINSTALL
|
||||||
|
@ -0,0 +1,114 @@
|
|||||||
|
diff --git a/Makefile.am b/Makefile.am
|
||||||
|
index 03e4419..5172bed 100644
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -5,3 +5,5 @@ pkgconfig_DATA = libnfs.pc
|
||||||
|
|
||||||
|
EXTRA_DIST = README COPYING libnfs.pc.in
|
||||||
|
|
||||||
|
+ACLOCAL_AMFLAGS = -I aclocal
|
||||||
|
+
|
||||||
|
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..9f0fde0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/aclocal/libtirpc.m4
|
||||||
|
@@ -0,0 +1,40 @@
|
||||||
|
+dnl Checks for TI-RPC library and headers
|
||||||
|
+dnl
|
||||||
|
+AC_DEFUN([AC_LIBTIRPC], [
|
||||||
|
+
|
||||||
|
+ AC_ARG_WITH([tirpcinclude],
|
||||||
|
+ [AC_HELP_STRING([--with-tirpcinclude=DIR],
|
||||||
|
+ [use TI-RPC headers in DIR])],
|
||||||
|
+ [tirpc_header_dir=$withval],
|
||||||
|
+ [tirpc_header_dir=/usr/include/tirpc])
|
||||||
|
+
|
||||||
|
+ dnl if --enable-tirpc was specifed, the following components
|
||||||
|
+ dnl must be present, and we set up HAVE_ macros for them.
|
||||||
|
+
|
||||||
|
+ if test "$enable_tirpc" != "no"; then
|
||||||
|
+
|
||||||
|
+ dnl look for the library; add to LIBS if found
|
||||||
|
+ AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
|
||||||
|
+ [if test "$enable_tirpc" = "yes"; then
|
||||||
|
+ AC_MSG_ERROR([libtirpc not found.])
|
||||||
|
+ else
|
||||||
|
+ AC_MSG_WARN([libtirpc not found. TIRPC disabled!])
|
||||||
|
+ enable_tirpc="no"
|
||||||
|
+ fi])
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ if test "$enable_tirpc" != "no"; then
|
||||||
|
+ dnl also must have the headers installed where we expect
|
||||||
|
+ dnl look for headers; add -I compiler option if found
|
||||||
|
+ AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
|
||||||
|
+ AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]),
|
||||||
|
+ [if test "$enable_tirpc" = "yes"; then
|
||||||
|
+ AC_MSG_ERROR([libtirpc headers not found.])
|
||||||
|
+ else
|
||||||
|
+ AC_MSG_WARN([libtirpc headers not found. TIRPC disabled!])
|
||||||
|
+ enable_tirpc="no"
|
||||||
|
+ fi])
|
||||||
|
+
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+])dnl
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 24400c3..f84e391 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
AC_PREREQ(2.50)
|
||||||
|
AC_INIT([libnfs], [1.0.0])
|
||||||
|
+AC_CONFIG_MACRO_DIR(aclocal)
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
AM_INIT_AUTOMAKE([foreign])
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
@@ -22,7 +23,14 @@ if test x$HAVE_RPCGEN != xyes; then
|
||||||
|
AC_MSG_ERROR([Can not find required program])
|
||||||
|
fi
|
||||||
|
|
||||||
|
-#option: examples
|
||||||
|
+dnl option: libtirpc
|
||||||
|
+AC_ARG_ENABLE(tirpc,
|
||||||
|
+ [AC_HELP_STRING([--enable-tirpc],
|
||||||
|
+ [enable use of TI-RPC @<:@default=no@:>@])],
|
||||||
|
+ enable_tirpc=$enableval,
|
||||||
|
+ enable_tirpc='no')
|
||||||
|
+
|
||||||
|
+dnl option: examples
|
||||||
|
AC_ARG_ENABLE([examples],
|
||||||
|
[AC_HELP_STRING([--enable-examples],
|
||||||
|
[Build example programs])],
|
||||||
|
@@ -34,12 +42,6 @@ if test x$ENABLE_EXAMPLES = xyes; then
|
||||||
|
fi
|
||||||
|
AC_SUBST(MAYBE_EXAMPLES)
|
||||||
|
|
||||||
|
-AC_ARG_ENABLE(tirpc,
|
||||||
|
- [AC_HELP_STRING([--enable-tirpc],
|
||||||
|
- [enable use of TI-RPC @<:@default=no@:>@])],
|
||||||
|
- enable_tirpc=$enableval,
|
||||||
|
- enable_tirpc='no')
|
||||||
|
-
|
||||||
|
case $host in
|
||||||
|
*darwin*)
|
||||||
|
RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t"
|
||||||
|
@@ -71,11 +73,13 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len],
|
||||||
|
#include <sys/socket.h>
|
||||||
|
])
|
||||||
|
|
||||||
|
+PKG_PROG_PKG_CONFIG()
|
||||||
|
+
|
||||||
|
+dnl Check for TI-RPC library and headers
|
||||||
|
+AC_LIBTIRPC
|
||||||
|
+
|
||||||
|
+dnl Check for TI-RPC library and headers
|
||||||
|
echo "Use TI-RPC: $enable_tirpc"
|
||||||
|
-if test "$enable_tirpc" = "yes"; then
|
||||||
|
- CFLAGS="${CFLAGS} -I /usr/include/tirpc"
|
||||||
|
- LDFLAGS="${LDFLAGS} -ltirpc"
|
||||||
|
-fi
|
||||||
|
|
||||||
|
#output
|
||||||
|
AC_CONFIG_FILES([Makefile]
|
Loading…
x
Reference in New Issue
Block a user