diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index a9ff8571cfe..c0a11fb27af 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -73,7 +73,7 @@ # include #endif -#ifdef HAVE_GETOPT_LONG +#ifdef HAVE_GETOPT_H #include #endif diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 69758bbe822..b85ef6c7ee5 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -225,6 +225,8 @@ AC_ARG_WITH(regex, AC_FUNC_FNMATCH +AC_CHECK_HEADERS(getopt.h) + AC_CHECK_FUNCS(glob strfmon getopt_long getopt_long_only) if test "$PHP_SAPI" = "cgi"; then