summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-10-23 18:22:38 +0200
committerGravatar waker <wakeroid@gmail.com>2010-10-23 18:22:38 +0200
commitaa7aaa4c2be4a27d858b582c338ba14a2aa72732 (patch)
treea2d63778b34c46a3208a30e8d95dfc01a586544b
parent47f411b6964dc2f0af7d0f35ac0016204f1d9e96 (diff)
portable build WIP
-rw-r--r--configure.ac90
-rw-r--r--plugins/adplug/Makefile.am8
-rw-r--r--plugins/adplug/adplug-db.cpp12
-rw-r--r--plugins/shellexec/Makefile.am2
-rw-r--r--plugins/sid/Makefile.am3
-rw-r--r--plugins/vfs_curl/Makefile.am2
6 files changed, 101 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index d0241d02..64d75c78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,15 +33,19 @@ fi
case "$host" in
i386-*-* | i486-*-* | i586-*-* | i686-*-* | i86pc-*-*)
AC_DEFINE(ARCH_X86_32, 1, [architecture is x86])
+ LIB="lib-x86-32"
;;
x86_64-*-* | amd64-*-*)
AC_DEFINE(ARCH_X86_64, 1, [architecture is x86_64])
+ LIB="lib-x86-64"
;;
powerpc-*-* )
AC_DEFINE(ARCH_PPC_32, 1, [architecture is ppc32])
+ LIB="lib-ppc-32"
;;
powerpc64-*-* )
AC_DEFINE(ARCH_PPC_64, 1, [architecture is ppc64])
+ LIB="lib-ppc-64"
;;
*)
AC_DEFINE(ARCH_UNKNOWN, 1, [architecture is unknown])
@@ -96,7 +100,7 @@ AC_ARG_ENABLE(portable, [ --enable-portable make portable static build (d
if test "x$enable_portable" != "xno" ; then
AC_DEFINE_UNQUOTED([PORTABLE], [1], [Define if building portable version])
PORTABLE=yes
- PREFIXFLAGS="-DPREFIX=donotuse -DLIBDIR=donotuse -DDOCDIR=donotuse"
+ PREFIXFLAGS="-DPREFIX=donotuse -DLIBDIR=donotuse -DDOCDIR=donotuse -I./include"
else
PREFIXFLAGS=" -DLIBDIR=\\\"$libdir\\\" -DPREFIX=\\\"$prefix\\\" -DDOCDIR=\\\"$docdir\\\""
fi
@@ -105,6 +109,12 @@ CXXFLAGS="$CXXFLAGS $INSANE_CXXFLAGS -D_GNU_SOURCE $PREFIXFLAGS"
CFLAGS="$CFLAGS $INSANE_CFLAGS -D_GNU_SOURCE $PREFIXFLAGS"
PKG_CHECK_MODULES(DEPS, samplerate)
+if test "x$enable_portable" != "xno" ; then
+ DEPS_LIBS="$LIB/libsamplerate.a -lpthread -ldl"
+ AC_SUBST(DEPS_LIBS)
+else
+ PKG_CHECK_MODULES(DEPS, samplerate)
+fi
if test "x$enable_gtkui" != "xno" ; then
if test "x$enable_gtk3" == "xyes" ; then
@@ -128,8 +138,8 @@ if test "x$enable_pulse" != "xno" ; then
PKG_CHECK_MODULES(PULSE_DEPS, libpulse-simple, HAVE_PULSE=yes, HAVE_PULSE=no)
fi
-AC_CHECK_LIB([pthread], [main])
-AC_CHECK_LIB([dl], [main])
+dnl AC_CHECK_LIB([pthread], [main])
+dnl AC_CHECK_LIB([dl], [main])
AC_CHECK_HEADER([iconv.h],[],[iconv.h not found.])
@@ -146,17 +156,33 @@ if test ${HAVE_SSE2}; then
fi
dnl curl lib
-AC_CHECK_LIB([curl], [main], [HAVE_CURL=yes])
-if test "x$HAVE_CURL" = "xyes"; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_CURL=yes
+ CURL_LIBS="../../$LIB/libcurl.a -lrt"
+ AC_SUBST(CURL_LIBS)
+else
+ AC_CHECK_LIB([curl], [main], [HAVE_CURL=yes])
CURL_LIBS="-lcurl"
AC_SUBST(CURL_LIBS)
fi
-PKG_CHECK_MODULES(DBUS_DEPS, dbus-1, HAVE_DBUS=yes, HAVE_DBUS=no)
+if test "x$enable_portable" != "xno" ; then
+ HAVE_DBUS=yes
+ DBUS_DEPS_LIBS="../../$LIB/libdbus-1.a ../../$LIB/libexpat.a -lrt"
+ DBUS_DEPS_CFLAGS="-I../../include/dbus-1"
+ AC_SUBST(DBUS_DEPS_LIBS)
+else
+ PKG_CHECK_MODULES(DBUS_DEPS, dbus-1, HAVE_DBUS=yes, HAVE_DBUS=no)
+fi
dnl mpgmad plugin
if test "x$enable_mpgmad" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_MPGMAD=yes
+ MAD_LIBS="../../$LIB/libmad.a"
+ AC_SUBST(MAD_LIBS)
+else
AC_CHECK_LIB([mad], [main], [HAVE_LIBMAD=yes])
if test "x$HAVE_LIBMAD" = "xyes" ; then
HAVE_MPGMAD=yes
@@ -164,9 +190,15 @@ if test "x$enable_mpgmad" != "xno" ; then
AC_SUBST(MAD_LIBS)
fi
fi
+fi
dnl vorbis plugin
if test "x$enable_vorbis" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_VORBISPLUGIN=yes
+ VORBIS_LIBS="../../$LIB/libogg.a ../../$LIB/libvorbis.a ../../$LIB/libvorbisenc.a ../../$LIB/libvorbisfile.a"
+ AC_SUBST(VORBIS_LIBS)
+else
AC_CHECK_LIB([vorbis], [main], [HAVE_VORBIS=yes])
AC_CHECK_LIB([vorbisfile], [main], [HAVE_VORBISFILE=yes])
if test "x$HAVE_VORBIS" = "xyes" && test "x$HAVE_VORBISFILE" = "xyes" ; then
@@ -175,9 +207,15 @@ if test "x$enable_vorbis" != "xno" ; then
AC_SUBST(VORBIS_LIBS)
fi
fi
+fi
dnl flac plugin
if test "x$enable_flac" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_FLACPLUGIN=yes
+ FLAC_LIBS="../../$LIB/libFLAC.a ../../$LIB/libogg.a"
+ AC_SUBST(FLAC_LIBS)
+else
AC_CHECK_LIB([FLAC], [main], [HAVE_FLAC=yes])
if test "x$HAVE_FLAC" = "xyes" ; then
HAVE_FLACPLUGIN=yes
@@ -185,9 +223,15 @@ if test "x$enable_flac" != "xno" ; then
AC_SUBST(FLAC_LIBS)
fi
fi
+fi
dnl wavpack plugin
if test "x$enable_wavpack" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_WAVPACKPLUGIN=yes
+ WAVPACK_LIBS="../../$LIB/libwavpack.a"
+ AC_SUBST(WAVPACK_LIBS)
+else
AC_CHECK_LIB([wavpack], [main], [HAVE_WAVPACK=yes])
if test "x$HAVE_WAVPACK" = "xyes" ; then
HAVE_WAVPACKPLUGIN=yes
@@ -195,9 +239,15 @@ if test "x$enable_wavpack" != "xno" ; then
AC_SUBST(WAVPACK_LIBS)
fi
fi
+fi
dnl libsndfile plugin
if test "x$enable_sndfile" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_SNDFILEPLUGIN=yes
+ SNDFILE_LIBS="../../$LIB/libsndfile.a"
+ AC_SUBST(SNDFILE_LIBS)
+else
AC_CHECK_LIB([sndfile], [main], [HAVE_SNDFILE=yes])
if test "x$HAVE_SNDFILE" = "xyes" ; then
HAVE_SNDFILEPLUGIN=yes
@@ -205,18 +255,24 @@ if test "x$enable_sndfile" != "xno" ; then
AC_SUBST(SNDFILE_LIBS)
fi
fi
+fi
dnl vfs_curl plugin
if test "x$enable_vfs_curl" != "xno" ; then
if test "x$HAVE_CURL" = "xyes" ; then
HAVE_VFS_CURL=yes
- VFS_CURL_LIBS="-lcurl"
+ VFS_CURL_LIBS="$CURL_LIBS"
AC_SUBST(VFS_CURL_LIBS)
fi
fi
dnl cdda plugin
if test "x$enable_cdda" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_CDDAPLUGIN=yes
+ CDDA_LIBS="../../$LIB/libcdio.a ../../$LIB/libudf.a ../../$LIB/libiso9660.a ../../$LIB/libcddb.a"
+ AC_SUBST(CDDA_LIBS)
+else
AC_CHECK_LIB([cdio], [main], [HAVE_CDIO=yes])
AC_CHECK_LIB([cddb], [main], [HAVE_CDDB=yes])
if test "x$HAVE_CDIO" = "xyes" && test "x$HAVE_CDDB" = "xyes" ; then
@@ -225,6 +281,7 @@ if test "x$enable_cdda" != "xno" ; then
AC_SUBST(CDDA_LIBS)
fi
fi
+fi
dnl gtkui plugin
if test "x$enable_gtkui" != "xno" ; then
@@ -375,6 +432,11 @@ if test "x$enable_dca" != "xno" ; then
fi
if test "x$enable_aac" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ FAAD2_LIBS="../../$LIB/libfaad.a"
+ AC_SUBST(FAAD2_LIBS)
+ HAVE_AAC=yes
+else
AC_CHECK_LIB([faad], [main], [HAVE_FAAD=1])
if test ${HAVE_FAAD} ; then
FAAD2_LIBS="-lfaad"
@@ -382,8 +444,14 @@ if test "x$enable_aac" != "xno" ; then
HAVE_AAC=yes
fi
fi
+fi
if test "x$enable_mms" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ LIBMMS_LIBS="../../$LIB/libmms.a -lglib-2.0"
+ AC_SUBST(LIBMMS_LIBS)
+ HAVE_MMS=yes
+else
AC_CHECK_LIB([mms], [main], [HAVE_LIBMMS=1])
if test ${HAVE_LIBMMS} ; then
LIBMMS_LIBS="-lmms"
@@ -391,15 +459,21 @@ if test "x$enable_mms" != "xno" ; then
HAVE_MMS=yes
fi
fi
+fi
if test "x$enable_shn" != "xno" ; then
HAVE_SHN=yes
fi
if test "x$enable_ao" != "xno" ; then
+if test "x$enable_portable" != "xno" ; then
+ HAVE_ZLIB=yes
+ ZLIB_LIBS="../../$LIB/libz.a"
+else
AC_CHECK_LIB([z], [main], [HAVE_ZLIB=yes])
+ ZLIB_LIBS="-lz"
+fi
if test "x$HAVE_ZLIB" = "xyes"; then
- ZLIB_LIBS="-lz"
AC_SUBST(ZLIB_LIBS)
HAVE_AO=yes
fi
diff --git a/plugins/adplug/Makefile.am b/plugins/adplug/Makefile.am
index a75f38b5..94fdd7d9 100644
--- a/plugins/adplug/Makefile.am
+++ b/plugins/adplug/Makefile.am
@@ -5,11 +5,12 @@ adlibdir = $(libdir)/$(PACKAGE)
pkglib_LTLIBRARIES = adplug.la
AM_CFLAGS = $(CFLAGS) -std=c99 -I$(adplugpath)/adplug -I$(adplugpath)/libbinio
+adplug_la_LDFLAGS = -module -nostdlib -lsupc++
-AM_CPPFLAGS = $(CXXFLAGS) -Dstricmp=strcasecmp -DVERSION=\"2.1\" -I$(adplugpath)/adplug -I$(adplugpath)/libbinio
+AM_CPPFLAGS = $(CXXFLAGS) -Dstricmp=strcasecmp -DVERSION=\"2.1\" -I$(adplugpath)/adplug -I$(adplugpath)/libbinio -fno-exceptions -fno-rtti -nostdlib -fno-unwind-tables
-adplug_la_SOURCES = adplug-db.cpp\
- plugin.c\
+adplug_la_SOURCES = plugin.c\
+ adplug-db.cpp\
libbinio/binfile.h\
libbinio/binio.h\
libbinio/binstr.h\
@@ -134,5 +135,4 @@ adplug_la_SOURCES = adplug-db.cpp\
# adplug/database.cpp
# adplug/database.h
-adplug_la_LDFLAGS = -module
endif
diff --git a/plugins/adplug/adplug-db.cpp b/plugins/adplug/adplug-db.cpp
index 567d55ca..a7b1f6b2 100644
--- a/plugins/adplug/adplug-db.cpp
+++ b/plugins/adplug/adplug-db.cpp
@@ -31,6 +31,18 @@
//#define trace(...) { fprintf (stderr, __VA_ARGS__); }
#define trace(fmt,...)
+int _Unwind_Resume_or_Rethrow;
+int _Unwind_RaiseException;
+int _Unwind_GetLanguageSpecificData;
+int _Unwind_Resume;
+int _Unwind_DeleteException;
+int _Unwind_GetTextRelBase;
+int _Unwind_SetIP;
+int _Unwind_GetDataRelBase;
+int _Unwind_GetRegionStart;
+int _Unwind_SetGR;
+int _Unwind_GetIPInfo;
+
extern "C" {
extern DB_decoder_t adplug_plugin;
diff --git a/plugins/shellexec/Makefile.am b/plugins/shellexec/Makefile.am
index 65d6a5b8..212f6a0b 100644
--- a/plugins/shellexec/Makefile.am
+++ b/plugins/shellexec/Makefile.am
@@ -4,6 +4,6 @@ pkglib_LTLIBRARIES = shellexec.la
shellexec_la_SOURCES = shellexec.c
shellexec_la_LDFLAGS = -module
-shellexec_la_LIBADD = $(LDADD) $(HOTKEYS_LIBS)
+shellexec_la_LIBADD = $(LDADD)
AM_CFLAGS = $(CFLAGS) -std=c99
endif
diff --git a/plugins/sid/Makefile.am b/plugins/sid/Makefile.am
index 38caa014..639480c3 100644
--- a/plugins/sid/Makefile.am
+++ b/plugins/sid/Makefile.am
@@ -103,8 +103,7 @@ sidplay-libs/libsidplay/src/kernal.bin\
sidplay-libs/libsidplay/src/psiddrv.bin\
sidplay-libs/libsidplay/src/poweron.bin
-sid_la_LIBADD = -lstdc++
-sid_la_LDFLAGS = -module
+sid_la_LDFLAGS = -module -nostdlib
AM_CFLAGS = $(CFLAGS) -std=c99 -I$(sidpath)/libsidplay/include -I$(sidpath)/builders/resid-builder/include -fPIC
AM_CPPFLAGS = $(CXXFLAGS) -DHAVE_UNIX -I$(sidpath) -I$(sidpath)/unix -I$(sidpath)/libsidplay -I$(sidpath)/libsidplay/include -I$(sidpath)/libsidplay/include/sidplay -I$(sidpath)/libsidutils/include/sidplay/utils -I$(sidpath)/builders/resid-builder/include/sidplay/builders -I$(sidpath)/builders/resid-builder/include -DHAVE_STRCASECMP -DHAVE_STRNCASECMP
diff --git a/plugins/vfs_curl/Makefile.am b/plugins/vfs_curl/Makefile.am
index 95794831..4c69c51f 100644
--- a/plugins/vfs_curl/Makefile.am
+++ b/plugins/vfs_curl/Makefile.am
@@ -4,6 +4,6 @@ pkglib_LTLIBRARIES = vfs_curl.la
vfs_curl_la_SOURCES = vfs_curl.c
vfs_curl_la_LDFLAGS = -module
-vfs_curl_la_LIBADD = $(LDADD) $(CURL_LIBS)
+vfs_curl_la_LIBADD = $(LDADD) $(VFS_CURL_LIBS)
AM_CFLAGS = $(CFLAGS) -std=c99
endif