1 dnl ######################################################################
2 dnl Do we have a GNUish getopt
3 AC_DEFUN([AMU_CHECK_GNU_GETOPT],
5 AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [
12 char *argv[] = { "actest", "arg", "-x", NULL };
17 rf = fopen("conftestresult", "w");
18 if (rf == NULL) exit(1);
20 while ( (c = getopt(argc, argv, "x")) != -1 ) {
29 fprintf(rf, isGNU ? "yes" : "no");
33 ac_cv_sys_gnu_getopt="`cat conftestresult`"
35 ac_cv_sys_gnu_getopt="fail"
38 if test "$ac_cv_sys_gnu_getopt" = "yes"
40 AC_DEFINE(HAVE_GNU_GETOPT)