X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=config_subdir.m4;h=45a1c6c4fb14f03439d336f29bb03a8ba240fa37;hb=b46cb18c91372bf32c0a946ce739884e4e42497c;hp=4102dfd327efa6669fe12538b53e8a3cfafee166;hpb=fcee511f4e9cd6042b0e3a0e8b072e1f52d75291;p=openocd.git diff --git a/config_subdir.m4 b/config_subdir.m4 index 4102dfd327..45a1c6c4fb 100644 --- a/config_subdir.m4 +++ b/config_subdir.m4 @@ -1,17 +1,3 @@ -dnl -dnl If needed, define the m4_ifblank and m4_ifnblank macros from autoconf 2.64 -dnl This allows us to run with earlier Autoconfs as well. -ifdef([m4_ifblank],[],[ -m4_define([m4_ifblank], -[m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$2], [$3])])]) -dnl -ifdef([m4_ifnblank],[],[ -m4_define([m4_ifnblank], -[m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$3], [$2])])]) -dnl - dnl AC_CONFIG_SUBDIRS does not allow configure options to be passed dnl to subdirs, this function allows that by creating a configure.gnu dnl script that prepends configure options and then calls the real @@ -21,7 +7,6 @@ AC_DEFUN([AX_CONFIG_SUBDIR_OPTION], AC_CONFIG_SUBDIRS([$1]) m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu], -[printf "#!/bin/sh -"\$"SHELL "../$srcdir/$1/configure" $2 \""\$"@"\" > "$srcdir/$1/configure.gnu" +[echo -e '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" $2 "'\$'@"' > "$srcdir/$1/configure.gnu" ]) ])