X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=m4%2Fbackticks.m4;fp=m4%2Fbackticks.m4;h=520554bdfeff25fd7d683005702cf8db824ba8da;hb=5a8db3625a47f0697ac1b1f459775ae59fe714ca;hp=0000000000000000000000000000000000000000;hpb=d4758d17bfb91cd5542b2ef6c92f1752fd2155ac;p=swftools.git diff --git a/m4/backticks.m4 b/m4/backticks.m4 new file mode 100644 index 0000000..520554b --- /dev/null +++ b/m4/backticks.m4 @@ -0,0 +1,30 @@ +AC_DEFUN(RFX_CHECK_SYSTEM_BACKTICKS, +[ +AC_MSG_CHECKING([whether system() can handle command substitution]) +AC_TRY_RUN([ +#include "stdlib.h" +int main (int argc, char*argv[]) +{ + return system("test `touch config.tmp2`"); +} +], OK=OK,,CROSSCOMPILE=1) + +if test "x${OK}" = "xOK";then + test -f config.tmp2 || OK= +fi + +if test "x${CROSSCOMPILE}" = "x1";then + OK=OK; +fi +if test "x${OK}" = "xOK";then +rm -f config.tmp2 +AC_MSG_RESULT(yes) +SYSTEM_BACKTICKS=1 +export SYSTEM_BACKTICKS +AC_DEFINE_UNQUOTED(SYSTEM_BACKTICKS, 1) +else +AC_MSG_RESULT(no) +fi +]) + +