aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-09 21:28:44 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-09-09 21:28:44 +0000
commitd6554ccc1ec223c52f33ff034491e64ac1fa92aa (patch)
tree353003ffc63d684a99a19fcf96b45d4ba4effa1e
parent36db9a046b5bb3e60968236a0c24c88e4b18fb82 (diff)
downloadusdx-d6554ccc1ec223c52f33ff034491e64ac1fa92aa.tar.gz
usdx-d6554ccc1ec223c52f33ff034491e64ac1fa92aa.tar.xz
usdx-d6554ccc1ec223c52f33ff034491e64ac1fa92aa.zip
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
Diffstat (limited to '')
-rwxr-xr-xconfigure46
-rw-r--r--configure.ac2
-rw-r--r--dists/autogen/m4/ax_extract_version.m44
-rw-r--r--src/Makefile.in2
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