From d6554ccc1ec223c52f33ff034491e64ac1fa92aa Mon Sep 17 00:00:00 2001 From: tobigun Date: Tue, 9 Sep 2008 21:28:44 +0000 Subject: FreeBSD compatibility fixes: - libpng -> libpng12 - arithmetic expressions with no argument do not work $(()) -> check for empty minor/major/release version added (error occurred with portaudio. The version is simply 19) - duplicates in linker flags removed (-L...) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1356 b956fd51-792f-4845-bead-9b4dfca2ff2c --- configure | 46 ++++++++++++++++++++++++++++------ configure.ac | 2 +- dists/autogen/m4/ax_extract_version.m4 | 4 +++ src/Makefile.in | 2 +- 4 files changed, 45 insertions(+), 9 deletions(-) diff --git a/configure b/configure index f5eb471e..c6e3c556 100755 --- a/configure +++ b/configure @@ -2750,6 +2750,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 FPC_VERSION_MAJOR=$(($major)) FPC_VERSION_MINOR=$(($minor)) @@ -4515,6 +4519,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 MACOSX_VERSION_MAJOR=$(($major)) MACOSX_VERSION_MINOR=$(($minor)) @@ -4548,23 +4556,23 @@ fi # libpng have_lib="no" - { $as_echo "$as_me:$LINENO: checking for libpng" >&5 -$as_echo_n "checking for libpng... " >&6; } + { $as_echo "$as_me:$LINENO: checking for libpng12" >&5 +$as_echo_n "checking for libpng12... " >&6; } if test x"$with_libpng" = xnocheck; then # do not call pkg-config, use user settings have_lib="yes" elif test x"$with_libpng" != xno; then # check if package exists if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng\"") >&5 - ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpng12\"") >&5 + ($PKG_CONFIG --exists --print-errors "libpng12") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then have_lib="yes" - libpng_LIBS=`$PKG_CONFIG --libs --silence-errors "libpng"` - libpng_LIBDIRS=`$PKG_CONFIG --libs-only-L --silence-errors "libpng"` + libpng_LIBS=`$PKG_CONFIG --libs --silence-errors "libpng12"` + libpng_LIBDIRS=`$PKG_CONFIG --libs-only-L --silence-errors "libpng12"` libpng_LIBDIRS=` echo "$libpng_LIBDIRS" | $SED 's/^[ \t]*//' | $SED 's/[ \t]*$//' ` @@ -4593,7 +4601,7 @@ $as_echo "no" >&6; } # check if package is required if test xyes = xyes -o x"$with_libpng" = xyes ; then # print error message and quit - err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng"` + err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "libpng12"` { { $as_echo "$as_me:$LINENO: error: $err_msg @@ -4919,6 +4927,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 libavcodec_VERSION_MAJOR=$(($major)) libavcodec_VERSION_MINOR=$(($minor)) @@ -5285,6 +5297,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 libavformat_VERSION_MAJOR=$(($major)) libavformat_VERSION_MINOR=$(($minor)) @@ -5443,6 +5459,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 libavutil_VERSION_MAJOR=$(($major)) libavutil_VERSION_MINOR=$(($minor)) @@ -5616,6 +5636,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 libswscale_VERSION_MAJOR=$(($major)) libswscale_VERSION_MINOR=$(($minor)) @@ -5786,6 +5810,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 libprojectM_VERSION_MAJOR=$(($major)) libprojectM_VERSION_MINOR=$(($minor)) @@ -6052,6 +6080,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 portaudio_VERSION_MAJOR=$(($major)) portaudio_VERSION_MINOR=$(($minor)) diff --git a/configure.ac b/configure.ac index 877264f1..9201a86a 100644 --- a/configure.ac +++ b/configure.ac @@ -155,7 +155,7 @@ fi # ----------------------------------------- # libpng -PKG_HAVE([libpng], [libpng], yes) +PKG_HAVE([libpng], [libpng12], yes) # find sdl PKG_HAVE([sdl], [sdl], yes) diff --git a/dists/autogen/m4/ax_extract_version.m4 b/dists/autogen/m4/ax_extract_version.m4 index e9501f69..c514e3c3 100644 --- a/dists/autogen/m4/ax_extract_version.m4 +++ b/dists/autogen/m4/ax_extract_version.m4 @@ -39,6 +39,10 @@ eof # Note: Do NOT indent the eof-delimiter # We use a here-document (<<< here-strings not POSIX compatible) + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + # strip preceding 0s and set unset version-parts to 0 [$1][_VERSION_MAJOR]=$(($major)) [$1][_VERSION_MINOR]=$(($minor)) diff --git a/src/Makefile.in b/src/Makefile.in index 534fe73f..110d3fec 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -133,7 +133,7 @@ endif LIBS ?= @LIBS@ LDFLAGS ?= @LDFLAGS@ -linkflags := $(strip $(LDFLAGS) $(LIBS)) +linkflags := $(sort $(LDFLAGS) $(LIBS)) ifneq ($(linkflags),) PLINKFLAGS := -k"$(linkflags)" endif -- cgit v1.2.3