Source: idesk
Version: 0.7.5-6
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

idesk fails to cross build from source, because it uses the build
architecture pkg-config. The cause is using AC_PATH_PROG for finding
pkg-config. It is much better to simply use PKG_CHECK_MODULES.
Unfortunately, that macro doesn't work, because it is wrongly used in
configure.in inside an if rather than AS_IF. The attached patch fixes
that and makes idesk cross buildable. Please consider applying it.

Helmut
--- idesk-0.7.5.orig/acinclude.m4
+++ idesk-0.7.5/acinclude.m4
@@ -181,16 +181,7 @@
       PKG_CONFIG=$xft_prefix/bin/pkg-config	  
    fi
 fi
-
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test "x$PKG_CONFIG" = "xno" ; then
-	ifelse([$2], , :, [$2])
-else 
-	XFT_CFLAGS=`$PKG_CONFIG $xftconf_args --cflags xft`
-	XFT_LIBS=`$PKG_CONFIG $xftconf_args --libs xft`
-	ifelse([$1], , :, [$1])
-fi
-
+PKG_CHECK_MODULES([XFT],[xft],[$1],[$2])
 ])
 
 # AM_PATH_XFT(default-value, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
--- idesk-0.7.5.orig/configure.in
+++ idesk-0.7.5/configure.in
@@ -116,13 +116,13 @@
 AC_ARG_ENABLE(
   libsn, [  --enable-libsn        include code for LIBSN [default=no]])
 
-if test -n "$enable_libsn"; then
+AS_IF([test -n "$enable_libsn"],[
                     PKG_CHECK_MODULES(LIBSN, libstartup-notification-1.0 >= 0.5)
       		    AC_MSG_RESULT([yes])
                     STARTUP="-DHAVE_STARTUP_NOTIFICATION -DSN_API_NOT_YET_FROZEN=1",
-else
+],[
   AC_MSG_RESULT([no])
-fi
+])
 
 AM_CONDITIONAL(HAVE_STARTUP_NOTIFICATION, test x$LIBSN = xtrue)
 AC_SUBST(STARTUP)

Reply via email to