Conditional gsettings.m4 support, AC_PATH_PROG
authorRyan Lortie <desrt@desrt.ca>
Sat, 19 Jun 2010 02:59:43 +0000 (22:59 -0400)
committerRyan Lortie <desrt@desrt.ca>
Sat, 19 Jun 2010 03:02:32 +0000 (23:02 -0400)
Add new support for conditional enabling of GSettings (as per
bug #616718) and use AC_PATH_PROG instead of AC_PATH_TOOL (as per
bug #621172).

configure.in
m4macros/gsettings.m4

index 3de3b53..99d960e 100644 (file)
@@ -2744,7 +2744,7 @@ if test $cross_compiling = yes; then
     AC_MSG_ERROR(Could not find a glib-genmarshal in your PATH)
   fi
 
-  AC_PATH_TOOL(GLIB_COMPILE_SCHEMAS, glib-compile-schemas, no)
+  AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas, no)
   if test x$GLIB_COMPILE_SCHEMAS = xno; then
     AC_MSG_ERROR(Could not find a glib-compile-schemas in your PATH)
   fi
index b74530e..ee97b57 100644 (file)
@@ -20,11 +20,13 @@ AC_DEFUN([GLIB_GSETTINGS],
   if test x$cross_compiling != xyes; then
     GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
   else
-    AC_PATH_TOOL(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
+    AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
   fi
   AC_SUBST(GLIB_COMPILE_SCHEMAS)
   if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
-    AC_MSG_ERROR([glib-compile-schemas not found.])
+    ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
+  else
+    ifelse([$1],,[:],[$1])
   fi
 
   GSETTINGS_RULES='