kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Update m4 macros
Simplify pkg-config.m4 and make sure that pkg-config can be overridden by setting CFLAGS & LIBS variables. Likewise for xmlrpc.m4. Also add static switches around xmlrpc linker flags when --enable-static has been specified.pull/2/head
rodzic
ba1dcae095
commit
f43b23c18a
|
|
@ -13,29 +13,26 @@ m4_if([$3], [yes],
|
|||
])
|
||||
m4_if([$4], [no], [ac_cv_want_[]$1=yes])
|
||||
|
||||
if test "x$ac_cv_want_[]$1" = "xno"; then
|
||||
AC_DEFINE([USE_]PKG_NAME_UC, 0)
|
||||
ac_cv_[]$1=no
|
||||
case "x$ac_cv_want_[]$1" in
|
||||
"xno")
|
||||
ac_cv_[]$1=no
|
||||
;;
|
||||
"xcheck")
|
||||
PKG_CHECK_MODULES(PKG_NAME_UC, [$2], [ac_cv_[]$1=yes], [ac_cv_[]$1=no])
|
||||
;;
|
||||
"xyes")
|
||||
PKG_CHECK_MODULES(PKG_NAME_UC, [$2])
|
||||
# if we get here the test has succeeded
|
||||
ac_cv_[]$1=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x$ac_cv_[]$1" = "xyes"; then
|
||||
AC_DEFINE([USE_]PKG_NAME_UC, 1, [Define to 1 if we are using $1])
|
||||
else
|
||||
PKG_CHECK_EXISTS([$2], ac_cv_[]$1=yes, ac_cv_[]$1=no)
|
||||
if test "x$ac_cv_want_[]$1" = "xcheck"; then
|
||||
PKG_CHECK_MODULES(PKG_NAME_UC, [$2], [:], [:])
|
||||
if test "x$ac_cv_[]$1" = "xyes"; then
|
||||
AC_DEFINE([USE_]PKG_NAME_UC, 1, [Define to 1 if we are using $1])
|
||||
else
|
||||
AC_DEFINE([USE_]PKG_NAME_UC, 0, [Define to 1 if we are using $1])
|
||||
fi
|
||||
else # $ac_cv_want_[]$1 is yes
|
||||
if test "x$ac_cv_[]$1" = "xno"; then
|
||||
if test "x$3" = "xyes"; then
|
||||
AC_MSG_NOTICE([--with-[]$1 was given, but test for $1 failed])
|
||||
fi
|
||||
else
|
||||
AC_DEFINE([USE_]PKG_NAME_UC, 1, [Define to 1 if we are using $1])
|
||||
fi
|
||||
PKG_CHECK_MODULES(PKG_NAME_UC, $2) # for the error message
|
||||
fi
|
||||
AC_DEFINE([USE_]PKG_NAME_UC, 0, [Define to 1 if we are using $1])
|
||||
fi
|
||||
|
||||
AC_SUBST(PKG_NAME_UC[_CFLAGS])
|
||||
AC_SUBST(PKG_NAME_UC[_LIBS])
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
AC_DEFUN([AC_FLDIGI_STATIC], [
|
||||
AC_ARG_ENABLE([static],
|
||||
AC_HELP_STRING([--enable-static], [enable static linking]),
|
||||
AC_HELP_STRING([--enable-static], [enable static linking for some libraries]),
|
||||
[case "${enableval}" in
|
||||
yes|no) ac_cv_static="${enableval}" ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-static]) ;;
|
||||
|
|
|
|||
24
m4/xmlrpc.m4
24
m4/xmlrpc.m4
|
|
@ -1,10 +1,19 @@
|
|||
AC_DEFUN([AC_FLDIGI_XMLRPC_CONFIG], [
|
||||
ac_cv_xmlrpc=no
|
||||
AC_PATH_PROG([XMLRPC_C_CONFIG], [xmlrpc-c-config], [no])
|
||||
if test "x$XMLRPC_C_CONFIG" != "xno" && $XMLRPC_C_CONFIG c++2 abyss-server; then
|
||||
XMLRPC_CFLAGS=`$XMLRPC_C_CONFIG c++2 abyss-server --cflags`
|
||||
XMLRPC_LIBS=`$XMLRPC_C_CONFIG c++2 abyss-server --ldadd`
|
||||
|
||||
if test "x$XMLRPC_CFLAGS" != "x" && test "x$XMLRPC_LIBS" != "x"; then
|
||||
ac_cv_xmlrpc=yes
|
||||
else
|
||||
AC_PATH_PROG([XMLRPC_C_CONFIG], [xmlrpc-c-config], [no])
|
||||
if test "x$XMLRPC_C_CONFIG" != "xno" && $XMLRPC_C_CONFIG c++2 abyss-server; then
|
||||
ac_cv_xmlrpc=yes
|
||||
|
||||
test "x$XMLRPC_CFLAGS" = "x" && XMLRPC_CFLAGS=`$XMLRPC_C_CONFIG c++2 abyss-server --cflags`
|
||||
if test "x$XMLRPC_LIBS" = "x"; then
|
||||
XMLRPC_LIBS=`$XMLRPC_C_CONFIG c++2 abyss-server --ldadd`
|
||||
test "$ac_cv_static" = "yes" && XMLRPC_LIBS="-Wl,-Bstatic $XMLRPC_LIBS -Wl,-Bdynamic"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
|
@ -24,19 +33,14 @@ AC_DEFUN([AC_FLDIGI_XMLRPC], [
|
|||
AC_DEFINE(USE_XMLRPC, 0, [Define to 1 if we are using xmlrpc])
|
||||
ac_cv_xmlrpc=no
|
||||
else
|
||||
AC_FLDIGI_XMLRPC_CONFIG
|
||||
if test "x$ac_cv_want_xmlrpc" = "xcheck"; then
|
||||
AC_FLDIGI_XMLRPC_CONFIG
|
||||
if test "x$ac_cv_xmlrpc" = "xyes"; then
|
||||
AC_DEFINE(USE_XMLRPC, 1, [Define to 1 if we are using xmlrpc])
|
||||
else
|
||||
AC_DEFINE(USE_XMLRPC, 0, [Define to 1 if we are using xmlrpc])
|
||||
fi
|
||||
else # $ac_cv_want_xmlrpc is yes
|
||||
if test "x$XMLRPC_CFLAGS" != "x" || test "x$XMLRPC_LIBS" != "x"; then
|
||||
ac_cv_xmlrpc=yes
|
||||
else
|
||||
AC_FLDIGI_XMLRPC_CONFIG
|
||||
fi
|
||||
if test "x$ac_cv_xmlrpc" = "xno"; then
|
||||
AC_MSG_FAILURE([--with-xmlrpc was given, but check for libxmlrpc-c failed])
|
||||
else
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue