babl r404 - in trunk: . babl extensions tests
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: babl r404 - in trunk: . babl extensions tests
- Date: Tue, 31 Mar 2009 17:09:23 +0000 (UTC)
Author: martinn
Date: Tue Mar 31 17:09:22 2009
New Revision: 404
URL: http://svn.gnome.org/viewvc/babl?rev=404&view=rev
Log:
Support hpux use of shl load/unload and dsos with .sl suffixes
Patch from Gary V. Vaughan
Modified:
trunk/ChangeLog
trunk/babl/babl-extension.c
trunk/configure.ac
trunk/extensions/.gitignore
trunk/extensions/Makefile.am
trunk/tests/Makefile.am
Modified: trunk/babl/babl-extension.c
==============================================================================
--- trunk/babl/babl-extension.c (original)
+++ trunk/babl/babl-extension.c Tue Mar 31 17:09:22 2009
@@ -133,8 +133,31 @@
#include <unistd.h>
#ifdef HAVE_DLFCN_H
+
#include <dlfcn.h>
#define HLIB void *
+
+#elif HAVE_DL_H
+
+#include <dl.h>
+#include <errno.h>
+#if !defined(DYNAMIC_PATH)
+# define DYNAMIC_PATH 0
+#endif
+#if !defined(BIND_RESTRICTED)
+# define BIND_RESTRICTED 0
+#endif
+#define RTLD_NOW (BIND_IMMEDIATE|BIND_NONFATAL|DYNAMIC_PATH)
+#define HLIB shl_t
+#define dlopen(path, flags) shl_load (path, flags, 0L)
+#define dlclose(handle) shl_unload (handle)
+#define dlerror() strerror (errno)
+static void *dlsym (HLIB handle, const char *name) {
+ void *address = 0;
+ shl_findsym(&handle, name, TYPE_UNDEFINED, &address);
+ return address;
+}
+
#endif
#ifndef RTLD_NOW
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Mar 31 17:09:22 2009
@@ -177,22 +177,22 @@
esac
-####################################################
-# Check how to generate plug-ins (with gcc at least)
-####################################################
+############################
+# Check how to find plug-ins
+############################
AC_MSG_CHECKING([for some Win32 platform])
case "$target_or_host" in
*-*-darwin*) # darwin
shrext=.dylib
- dynamiclib=-dynamiclib
+ ;;
+ hppa*-hpux*) # HP/UX
+ shrext=.sl
;;
*-*-mingw* | *-*-cygwin*) # windows
shrext=.dll
- dynamiclib=-shared
;;
*) # linux (and BSD?)
- dynamiclib=-shared
shrext=.so
;;
esac
@@ -201,10 +201,6 @@
AC_SUBST(SHREXT)
AC_DEFINE_UNQUOTED(SHREXT, "$shrext", [File extension for shared libraries])
-DYNAMICLIB=$dynamiclib
-AC_SUBST(DYNAMICLIB)
-AC_DEFINE_UNQUOTED(DYNAMICLIB, "$dynamiclib", [Dynamic shared library])
-
dnl ===========================================================================
#################
@@ -367,6 +363,8 @@
dnl ===========================================================================
+AC_CHECK_HEADERS(dl.h)
+
AC_SEARCH_LIBS([dlopen], [dl])
AC_SEARCH_LIBS([rint], [m])
Modified: trunk/extensions/.gitignore
==============================================================================
--- trunk/extensions/.gitignore (original)
+++ trunk/extensions/.gitignore Tue Mar 31 17:09:22 2009
@@ -1,3 +1,4 @@
+/*.so
+/.deps
/Makefile
/Makefile.in
-/*.so
Modified: trunk/extensions/Makefile.am
==============================================================================
--- trunk/extensions/Makefile.am (original)
+++ trunk/extensions/Makefile.am Tue Mar 31 17:09:22 2009
@@ -1,61 +1,25 @@
-# General minimalistic compile file for self contained single
-# file babl_extensions
-
if OS_WIN32
-no_undefined = -no-undefined
-libbabldlla=$(top_builddir)/babl/.libs/libbabl-$(BABL_API_VERSION).dll.a
+AM_LDFLAGS = -module -no-undefined
+else
+AM_LDFLAGS = -module
endif
-CFILES = $(wildcard $(srcdir)/*.c)
-SOBJS = $(subst $(srcdir)/,,$(CFILES:.c=$(SHREXT)))
-INSTALLED_ITEMS = $(subst $(srcdir),$(ext_dir),$(CFILES:.c=$(SHREXT)))
-EXTRA_DIST = $(wildcard *.[ch])
-
-all-local: $(SOBJS)
-
AM_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_srcdir)/babl \
- -I$(top_srcdir)/extensions \
- -fPIC
-
-LDFLAGS += $(DYNAMICLIB)
-
-if OS_WIN32
-LDADD = $(no-undefined) $(libbabldlla) $(MATH_LIB)
-else
-LDADD = $(top_builddir)/babl/.libs/libbabl-$(BABL_API_VERSION)$(SHREXT) $(MATH_LIB)
-endif
-
-%$(SHREXT): %.c
- $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
-
-# if extension needing external libraries are to be # compiled with this make
-# file, each of them can be added according to the this pattern:
-# extra$(SHREXT): extra.c
-# $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< [own compile and link flags]
-
-CIE-Lab$(SHREXT): CIE-Lab.c
- $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
-
-sse-fixups$(SHREXT): sse-fixups.c
- $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(MMX_EXTRA_CFLAGS) $(SSE_EXTRA_CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD)
-#lcms$(SHREXT): lcms.c
-
-# $(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDADD) `pkg-config lcms --cflags --libs`
-#############################################################################
-
-clean-local:
- rm -f $(SOBJS)
-
-ext_dir = $(DESTDIR)$(libdir)/babl- BABL_API_VERSION@
+ -I$(top_srcdir)/extensions
-install-exec-local: all-local
- $(INSTALL) -d $(ext_dir)
- $(INSTALL) $(SOBJS) $(ext_dir)
+extdir = $(DESTDIR)$(libdir)/babl- BABL_API_VERSION@
+ext_LTLIBRARIES = \
+ CIE-Lab.la \
+ gegl-fixups.la \
+ gggl-lies.la \
+ gggl.la \
+ gimp-8bit.la \
+ naive-CMYK.la \
+ sse-fixups.la
-uninstall-local:
- rm -f $(INSTALLED_ITEMS)
+LIBS = $(top_builddir)/babl/libbabl- BABL_API_VERSION@.la $(MATH_LIB)
-check-local: all-local
+sse_fixups_la_CFLAGS = $(MMX_EXTRA_CFLAGS) $(SSE_EXTRA_CFLAGS)
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Tue Mar 31 17:09:22 2009
@@ -8,7 +8,7 @@
types \
models
-TESTS_ENVIRONMENT = BABL_PATH=$(top_builddir)/extensions
+TESTS_ENVIRONMENT = BABL_PATH=$(top_builddir)/extensions/.libs
grayscale_to_rgb_SOURCES = grayscale_to_rgb.c
rgb_to_bgr_SOURCES = rgb_to_bgr.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]