zzcatsdl_SOURCES = SDL_rwops_zzcat.c SDL_rwops_zzip.c
ZZIP_CFLAGS= `export PKG_CONFIG_PATH=../zzip; pkg-config zziplib --cflags`
ZZIP_LIBS= `export PKG_CONFIG_PATH=../zzip; pkg-config zziplib --libs`
-SDL_CFLAGS= `pkg-config sdl --cflags`
-SDL_LIBS= `pkg-config sdl --libs`
+SDL_CFLAGS= `export PKG_CONFIG_PATH=.; pkg-config sdl --cflags`
+SDL_LIBS= `export PKG_CONFIG_PATH=.; pkg-config sdl --libs`
CFLAGS= -I$(srcdir) $(ZZIP_CFLAGS) $(SDL_CFLAGS)
LIBS= $(ZZIP_LIBS) $(SDL_LIBS)
./zzcatsdl$(EXEEXT) test/README > test.out
diff -q @top_srcdir@/README test.out && rm test.out
+all: @SDL_GENERATE@
sdl : all
install-sdl : install-data # and not the binary
@ echo "Description: SDL_rwops for ZZipLib" >>$@
echo 'Requires: sdl, zziplib' >>$@
echo 'Cflags: -I$${zzipsdldir}' >>$@
+
+sdl-pc : sdl-uninstalled.pc
+sdl-uninstalled.pc : Makefile
+ @ echo "prefix=`sdl-config --prefix`" >$@
+ @ echo "Name: sdl" >>$@
+ @ echo "Version: `sdl-config --version`" >>$@
+ @ echo "Description: sdl - Simple DirectMedia Layer" >>$@
+ echo "Libs: `sdl-config --libs`" >> $@
+ echo "Cflags: `sdl-config --cflags`" >>$@
RELEASE_INFO = @RELEASE_INFO@
RESOLVES = @RESOLVES@
SDL = @SDL@
+SDL_GENERATE = @SDL_GENERATE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
zzcatsdl_SOURCES = SDL_rwops_zzcat.c SDL_rwops_zzip.c
ZZIP_CFLAGS = `export PKG_CONFIG_PATH=../zzip; pkg-config zziplib --cflags`
ZZIP_LIBS = `export PKG_CONFIG_PATH=../zzip; pkg-config zziplib --libs`
-SDL_CFLAGS = `pkg-config sdl --cflags`
-SDL_LIBS = `pkg-config sdl --libs`
+SDL_CFLAGS = `export PKG_CONFIG_PATH=.; pkg-config sdl --cflags`
+SDL_LIBS = `export PKG_CONFIG_PATH=.; pkg-config sdl --libs`
CLEANFILES = *.pc *.omf
pkgconfig_HEADERS = SDL_rwops_zzip.pc
ERRNULL = 2>/dev/null
./zzcatsdl$(EXEEXT) test/README > test.out
diff -q @top_srcdir@/README test.out && rm test.out
+all: @SDL_GENERATE@
sdl : all
install-sdl : install-data # and not the binary
echo 'Requires: sdl, zziplib' >>$@
echo 'Cflags: -I$${zzipsdldir}' >>$@
+sdl-pc : sdl-uninstalled.pc
+sdl-uninstalled.pc : Makefile
+ @ echo "prefix=`sdl-config --prefix`" >$@
+ @ echo "Name: sdl" >>$@
+ @ echo "Version: `sdl-config --version`" >>$@
+ @ echo "Description: sdl - Simple DirectMedia Layer" >>$@
+ echo "Libs: `sdl-config --libs`" >> $@
+ echo "Cflags: `sdl-config --cflags`" >>$@
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
RESOLVES
ZZIPLIB_LDFLAGS
ZIPTESTS
+SDL_GENERATE
SDL
ZLIB_VERSION
LARGEFILE_CFLAGS
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5489: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5490: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5492: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5493: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5495: output\"" >&5)
+ (eval echo "\"\$as_me:5496: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6698 "configure"' > conftest.$ac_ext
+ echo '#line 6699 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8553: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8554: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8557: \$? = $ac_status" >&5
+ echo "$as_me:8558: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8892: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8893: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8896: \$? = $ac_status" >&5
+ echo "$as_me:8897: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8997: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8998: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9001: \$? = $ac_status" >&5
+ echo "$as_me:9002: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:9052: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:9053: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:9056: \$? = $ac_status" >&5
+ echo "$as_me:9057: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11852 "configure"
+#line 11853 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11948 "configure"
+#line 11949 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
{ $as_echo "$as_me:$LINENO: checking whether making SDL parts" >&5
$as_echo_n "checking whether making SDL parts... " >&6; }
SDL=""
+SDL_GENERATE=""
# Check whether --enable-sdl was given.
if test "${enable_sdl+set}" = set; then
enableval=$enable_sdl;
$as_echo "no, disabled" >&6; }
else
enable_sdl=`pkg-config --modversion sdl 2>/dev/null`
+ if test -z "$enable_sdl"; then
+ enable_sdl=`sdl-config --version 2>/dev/null`
+ SDL_GENERATE="sdl-uninstalled.pc"
+ enable_sdl="$enable_sdl (sdl-config)"
+ else
+ enable_sdl="$enable_sdl (pkgconfig)"
+ fi
+ enable_sdl="$enable_sdl."
case ".$enable_sdl" in
.1.*) { $as_echo "$as_me:$LINENO: result: yes, using SDL $enable_sdl" >&5
$as_echo "yes, using SDL $enable_sdl" >&6; }
*) { $as_echo "$as_me:$LINENO: result: no, $enable_sdl" >&5
$as_echo "no, $enable_sdl" >&6; } ;;
esac
+ if test -n "$SDL_GENERATE"; then
+ { $as_echo "$as_me:$LINENO: result: enabled SDL generation of... $SDL_GENERATE" >&5
+$as_echo "enabled SDL generation of... $SDL_GENERATE" >&6; }
+ fi
fi
+
# ---------------------------------------------------------------
{ $as_echo "$as_me:$LINENO: checking running extra tests on make check" >&5
$as_echo_n "checking running extra tests on make check... " >&6; }
# ---------------------------------------------------------------
AC_MSG_CHECKING(whether making SDL parts)
SDL=""
+SDL_GENERATE=""
AC_ARG_ENABLE(sdl, AC_HELP_STRING(
[--enable-sdl],[enable SDL usage (if present)])
,,[enable_sdl="no"])
AC_MSG_RESULT([no, disabled])
else
enable_sdl=`pkg-config --modversion sdl 2>/dev/null`
+ if test -z "$enable_sdl"; then
+ enable_sdl=`sdl-config --version 2>/dev/null`
+ SDL_GENERATE="sdl-uninstalled.pc"
+ enable_sdl="$enable_sdl (sdl-config)"
+ else
+ enable_sdl="$enable_sdl (pkgconfig)"
+ fi
+ enable_sdl="$enable_sdl."
case ".$enable_sdl" in
.1.*) AC_MSG_RESULT([yes, using SDL $enable_sdl])
SDL="SDL" ;;
SDL="SDL" ;;
*) AC_MSG_RESULT([no, $enable_sdl]) ;;
esac
+ if test -n "$SDL_GENERATE"; then
+ AC_MSG_RESULT([enabled SDL generation of... $SDL_GENERATE])
+ fi
fi
-AC_SUBST(SDL)
+AC_SUBST([SDL])
+AC_SUBST([SDL_GENERATE])
# ---------------------------------------------------------------
AC_MSG_CHECKING(running extra tests on make check)
if test "MKZIP" != ":" ; then