diff options
author | brian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2015-08-15 19:11:41 +0000 |
---|---|---|
committer | brian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2015-08-15 19:11:41 +0000 |
commit | bd6edd76cbe2cdee409c050eee28292f0f1cbdb2 (patch) | |
tree | 95c654c98b06543228ae0057065697ac89cd9dc9 | |
parent | 9e7a37fb651c3b3bb0a6ffdd29b1c7735c3a622c (diff) | |
download | usdx-bd6edd76cbe2cdee409c050eee28292f0f1cbdb2.tar.gz usdx-bd6edd76cbe2cdee409c050eee28292f0f1cbdb2.tar.xz usdx-bd6edd76cbe2cdee409c050eee28292f0f1cbdb2.zip |
Check for SDL_image in the configure script (thanks to mischi)
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3122 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rwxr-xr-x | configure | 63 | ||||
-rw-r--r-- | configure.ac | 3 |
2 files changed, 66 insertions, 0 deletions
@@ -4894,6 +4894,69 @@ See the pkg-config man page for more details. fi +# find SDL_image + + have_lib="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL_image" >&5 +$as_echo_n "checking for SDL_image... " >&6; } + if test x"$with_SDL_image" = xnocheck; then + # do not call pkg-config, use user settings + have_lib="yes" + elif test x"$with_SDL_image" != xno; then + # check if package exists + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"SDL_image\""; } >&5 + ($PKG_CONFIG --exists --print-errors "SDL_image") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + have_lib="yes" + SDL_image_LIBS=`$PKG_CONFIG --libs --silence-errors "SDL_image"` + SDL_image_LIBDIRS=`$PKG_CONFIG --libs-only-L --silence-errors "SDL_image"` + SDL_image_LIBDIRS=` + echo "$SDL_image_LIBDIRS" | $SED 's/^[ \t]*//' | $SED 's/[ \t]*$//' +` + # add library directories to LIBS (ignore *_LIBS for now) + if test -n "$SDL_image_LIBDIRS"; then + LIBS="$LIBS $SDL_image_LIBDIRS" + fi + +fi + fi + if test x$have_lib = xyes; then + SDL_image_HAVE="yes" + if test -n "$SDL_image_LIBDIRS"; then + # show additional lib-dirs + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($SDL_image_LIBDIRS)" >&5 +$as_echo "yes ($SDL_image_LIBDIRS)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + else + SDL_image_HAVE="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + # check if package is required + if test xyes = xyes -o x"$with_SDL_image" = xyes ; then + # print error message and quit + err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "SDL_image"` + as_fn_error $? " + +$err_msg + +Alternatively, you may set --with-SDL_image=nocheck and the environment +variables SDL_image_[...] (see configure --help) +to appropriate values to avoid the need to call pkg-config. + +See the pkg-config man page for more details. +" "$LINENO" 5 + fi + fi + + # find freetype have_lib="no" diff --git a/configure.ac b/configure.ac index 4974414e..aa3b7a7d 100644 --- a/configure.ac +++ b/configure.ac @@ -169,6 +169,9 @@ fi # find sdl PKG_HAVE([sdl], [sdl], yes) +# find SDL_image +PKG_HAVE([SDL_image], [SDL_image], yes) + # find freetype PKG_HAVE([freetype], [freetype2], yes) |