1dnl
2dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64
3dnl This allows us to run with earlier Autoconfs as well.
4ifdef([m4_ifblank],[],[
5m4_define([m4_ifblank],
6[m4_if(m4_translit([[$1]],  [ ][	][
7]), [], [$2], [$3])])])
8dnl
9ifdef([m4_ifnblank],[],[
10m4_define([m4_ifnblank],
11[m4_if(m4_translit([[$1]],  [ ][	][
12]), [], [$3], [$2])])])
13dnl
14
15dnl AC_CONFIG_SUBDIRS does not allow configure options to be passed
16dnl to subdirs, this function allows that by creating a configure.gnu
17dnl script that prepends configure options and then calls the real
18dnl configure script
19AC_DEFUN([AX_CONFIG_SUBDIR_OPTION],
20[
21AC_CONFIG_SUBDIRS([$1])
22
23m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu],
24[echo -e '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" $2 "'\$'@"' > "$srcdir/$1/configure.gnu"
25])
26])
27