diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -880,7 +880,7 @@ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) AC_MSG_CHECKING(for JACK $JACK_REQUIRED_VERSION support) if test x$PKG_CONFIG != xno; then - if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then + if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then JACK_CFLAGS=`$PKG_CONFIG --cflags jack` JACK_LIBS=`$PKG_CONFIG --libs jack` audio_jack=yes @@ -2349,6 +2349,12 @@ CheckOpenGLESX11() { if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then + save_CFLAGS="$CFLAGS" + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists egl; then + EGL_CFLAGS=`$PKG_CONFIG --cflags egl` + CFLAGS="$save_CFLAGS $EGL_CFLAGS" + fi AC_MSG_CHECKING(for EGL support) video_opengl_egl=no AC_TRY_COMPILE([ @@ -2361,10 +2367,14 @@ video_opengl_egl=yes ]) AC_MSG_RESULT($video_opengl_egl) + CFLAGS="$save_CFLAGS" if test x$video_opengl_egl = xyes; then AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ]) + if test x$EGL_CFLAGS != x; then + EXTRA_CFLAGS="$EXTRA_CFLAGS $EGL_CFLAGS" + fi fi - + if test x$enable_video_opengles1 = xyes; then AC_MSG_CHECKING(for OpenGL ES v1 headers) video_opengles_v1=no diff --git a/configure b/configure --- a/configure +++ b/configure @@ -17999,7 +17999,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK $JACK_REQUIRED_VERSION support" >&5 $as_echo_n "checking for JACK $JACK_REQUIRED_VERSION support... " >&6; } if test x$PKG_CONFIG != xno; then - if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then + if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then JACK_CFLAGS=`$PKG_CONFIG --cflags jack` JACK_LIBS=`$PKG_CONFIG --libs jack` audio_jack=yes @@ -21806,6 +21806,52 @@ CheckOpenGLESX11() { if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then + save_CFLAGS="$CFLAGS" + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists egl; then + EGL_CFLAGS=`$PKG_CONFIG --cflags egl` + CFLAGS="$save_CFLAGS $EGL_CFLAGS" + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGL support" >&5 $as_echo_n "checking for EGL support... " >&6; } video_opengl_egl=no @@ -21834,10 +21880,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl_egl" >&5 $as_echo "$video_opengl_egl" >&6; } + CFLAGS="$save_CFLAGS" if test x$video_opengl_egl = xyes; then $as_echo "#define SDL_VIDEO_OPENGL_EGL 1" >>confdefs.h + if test x$EGL_CFLAGS != x; then + EXTRA_CFLAGS="$EXTRA_CFLAGS $EGL_CFLAGS" + fi fi if test x$enable_video_opengles1 = xyes; then