aboutsummaryrefslogtreecommitdiff
path: root/libgm2/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libgm2/configure')
-rwxr-xr-xlibgm2/configure147
1 files changed, 142 insertions, 5 deletions
diff --git a/libgm2/configure b/libgm2/configure
index d55a7f4a74b..a0ad71e7c6c 100755
--- a/libgm2/configure
+++ b/libgm2/configure
@@ -4950,8 +4950,8 @@ fi
-for ac_header in limits.h stddef.h string.h strings.h stdlib.h \
- time.h \
+for ac_header in getopt.h limits.h stddef.h string.h strings.h \
+ stdlib.h time.h \
fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
sys/socket.h \
@@ -4973,7 +4973,6 @@ done
-
case ${build_alias} in
"") build_noncanonical=${build} ;;
*) build_noncanonical=${build_alias} ;;
@@ -12789,7 +12788,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12792 "configure"
+#line 12791 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12895,7 +12894,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12898 "configure"
+#line 12897 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18061,6 +18060,144 @@ $as_echo "#define HAVE_GETGID 1" >>confdefs.h
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking m2 front end checking c library for getopt_long" >&5
+$as_echo_n "checking m2 front end checking c library for getopt_long... " >&6; }
+ if test x$gcc_no_link != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getopt_long in -lc" >&5
+$as_echo_n "checking for getopt_long in -lc... " >&6; }
+if ${ac_cv_lib_c_getopt_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getopt_long ();
+int
+main ()
+{
+return getopt_long ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_c_getopt_long=yes
+else
+ ac_cv_lib_c_getopt_long=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getopt_long" >&5
+$as_echo "$ac_cv_lib_c_getopt_long" >&6; }
+if test "x$ac_cv_lib_c_getopt_long" = xyes; then :
+
+$as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
+
+else
+
+ $as_echo "#undef HAVE_GETOPT_LONG" >>confdefs.h
+
+fi
+
+ else
+ if test "x$ac_cv_lib_c_getopt_long" = xyes; then
+
+$as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
+
+ elif test "x$ac_cv_func_getopt_long" = xyes; then
+
+$as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
+
+ else
+
+ $as_echo "#undef HAVE_GETOPT_LONG" >>confdefs.h
+
+ fi
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking m2 front end checking c library for getopt_long_only" >&5
+$as_echo_n "checking m2 front end checking c library for getopt_long_only... " >&6; }
+ if test x$gcc_no_link != xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getopt_long_only in -lc" >&5
+$as_echo_n "checking for getopt_long_only in -lc... " >&6; }
+if ${ac_cv_lib_c_getopt_long_only+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getopt_long_only ();
+int
+main ()
+{
+return getopt_long_only ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_c_getopt_long_only=yes
+else
+ ac_cv_lib_c_getopt_long_only=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_getopt_long_only" >&5
+$as_echo "$ac_cv_lib_c_getopt_long_only" >&6; }
+if test "x$ac_cv_lib_c_getopt_long_only" = xyes; then :
+
+$as_echo "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
+
+else
+
+ $as_echo "#undef HAVE_GETOPT_LONG_ONLY" >>confdefs.h
+
+fi
+
+ else
+ if test "x$ac_cv_lib_c_getopt_long_only" = xyes; then
+
+$as_echo "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
+
+ elif test "x$ac_cv_func_getopt_long_only" = xyes; then
+
+$as_echo "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
+
+ else
+
+ $as_echo "#undef HAVE_GETOPT_LONG_ONLY" >>confdefs.h
+
+ fi
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking m2 front end checking c library for getpid" >&5
$as_echo_n "checking m2 front end checking c library for getpid... " >&6; }
if test x$gcc_no_link != xyes; then