From 17e7f6c2eb3a59bccce90a6660eb5f8411142f61 Mon Sep 17 00:00:00 2001 From: Bryce Denney Date: Sat, 16 Nov 2002 13:43:41 +0000 Subject: [PATCH] - add configure test for -lmingwex, which is needed on newer cygwin systems for opendir(), readdir() and closedir() used in ltdl.c. --- bochs/configure | 61 +++++++++++++++++++++++++++++++++++++++++++++- bochs/configure.in | 3 ++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/bochs/configure b/bochs/configure index 9c4a5a78f..718138711 100755 --- a/bochs/configure +++ b/bochs/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in,v 1.164 2002/11/14 18:17:29 bdenney Exp . +# From configure.in Id: configure.in,v 1.165 2002/11/14 18:45:41 bdenney Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -20732,6 +20732,65 @@ esac case $target in *-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw*) if test "$bx_plugins" = 1; then + echo "$as_me:$LINENO: checking for opendir in -lmingwex" >&5 +echo $ECHO_N "checking for opendir in -lmingwex... $ECHO_C" >&6 +if test "${ac_cv_lib_mingwex_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmingwex $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_mingwex_opendir=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_mingwex_opendir=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_mingwex_opendir" >&5 +echo "${ECHO_T}$ac_cv_lib_mingwex_opendir" >&6 +if test $ac_cv_lib_mingwex_opendir = yes; then + LIBS="$LIBS -lmingwex" +fi + # set variables for building DLL plugins PRIMARY_TARGET=".win32_dll_plugin_target" PLUGIN_LIBNAME_TRANSFORMATION='%.o=bx_%.dll' diff --git a/bochs/configure.in b/bochs/configure.in index 56a43e4ea..625b8cb44 100644 --- a/bochs/configure.in +++ b/bochs/configure.in @@ -2,7 +2,7 @@ dnl // Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(bochs.h) -AC_REVISION([[$Id: configure.in,v 1.165 2002-11-14 18:45:41 bdenney Exp $]]) +AC_REVISION([[$Id: configure.in,v 1.166 2002-11-16 13:43:38 bdenney Exp $]]) AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(ltdlconf.h) @@ -1847,6 +1847,7 @@ esac case $target in *-pc-windows* | *-pc-winnt* | *-cygwin* | *-mingw*) if test "$bx_plugins" = 1; then + AC_CHECK_LIB(mingwex, opendir, LIBS="$LIBS -lmingwex") # set variables for building DLL plugins PRIMARY_TARGET=".win32_dll_plugin_target" PLUGIN_LIBNAME_TRANSFORMATION='%.o=bx_%.dll'