DEPDIR = @DEPDIR@
SDL_CFLAGS = @SDL_CFLAGS@
-SDL_LIBS = @SDL_LIBS@
TERMCAP_LIB = @TERMCAP_LIB@
READLINE_LIB = @READLINE_LIB@
READLINE_CFLAGS = @READLINE_CFLAGS@
eth_phy
SIM_EXTRA_CFLAGS = $(SDL_CFLAGS)
-SIM_EXTRA_LIBS = $(SDL_LIBS)
## COMMON_POST_CONFIG_FRAG
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=1"
- SDL_LIBS="-ldl"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=1"
- SDL_LIBS="-ldl"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=2"
- SDL_LIBS="-ldl"
+
+fi
+ if test -n "$SDL_CFLAGS"; then :
+ if test "$ac_cv_search_dlopen" = no; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SDL support requires dlopen support" >&5
+$as_echo "$as_me: WARNING: SDL support requires dlopen support" >&2;}
+
+fi
fi
else
SDL_CFLAGS=
- SDL_LIBS=
fi
-
+SDL_LIBS=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
if test "${ac_cv_lib_dl_dlopen}" = "yes"; then
PKG_CHECK_MODULES(SDL, sdl2, [dnl
SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=2"
- SDL_LIBS="-ldl"
], [
PKG_CHECK_MODULES(SDL, sdl, [dnl
SDL_CFLAGS="${SDL_CFLAGS} -DHAVE_SDL=1"
- SDL_LIBS="-ldl"
], [:])
])
+ dnl If we use SDL, we need dlopen support.
+ AS_IF([test -n "$SDL_CFLAGS"], [dnl
+ AS_IF([test "$ac_cv_search_dlopen" = no], [dnl
+ AC_MSG_WARN([SDL support requires dlopen support])
+ ])
+ ])
else
SDL_CFLAGS=
- SDL_LIBS=
fi
+dnl We dlopen the libs at runtime, so never pass down SDL_LIBS.
+SDL_LIBS=
AC_SUBST(SDL_CFLAGS)
-AC_SUBST(SDL_LIBS)
dnl In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,