diff -Naur pstoedit-3.33.orig/configure pstoedit-3.33/configure --- pstoedit-3.33.orig/configure Tue Jan 7 06:21:27 2003 +++ pstoedit-3.33/configure Wed Jan 8 15:03:40 2003 @@ -3849,7 +3849,7 @@ ;; darwin* | rhapsody*) - lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' + lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_cmd='/usr/bin/file -L' case "$host_os" in rhapsody* | darwin1.[012]) @@ -9381,6 +9381,27 @@ # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; + darwin* | rhapsody*) + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='-undefined suppress' + ;; + *) # Darwin 1.3 on + allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + ;; + esac + + # FIXME: Relying on posixy $() will cause problems for + # cross-compilation, but unfortunately the echo tests do not + # yet detect zsh echo's removal of \ escapes. Also zsh mangles + # `"' quotes if we put them in here... so don't! + archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' + # We need to add '_' to the symbols in $export_symbols first + #_LT_AC_TAGVAR(archive_expsym_cmds, )="$_LT_AC_TAGVAR(archive_cmds, )"' && strip -s $export_symbols' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + whole_archive_flag_spec_CXX='-all_load $convenience' + ;; dgux*) case $cc_basename in diff -Naur pstoedit-3.33.orig/ltmain.sh pstoedit-3.33/ltmain.sh --- pstoedit-3.33.orig/ltmain.sh Mon Dec 9 05:09:26 2002 +++ pstoedit-3.33/ltmain.sh Wed Jan 8 18:27:56 2003 @@ -2093,7 +2093,7 @@ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes + need_relink=no fi # This is a shared library if test "$linkmode" = lib && diff -Naur pstoedit-3.33.orig/src/Makefile.in pstoedit-3.33/src/Makefile.in --- pstoedit-3.33.orig/src/Makefile.in Tue Jan 7 06:21:25 2003 +++ pstoedit-3.33/src/Makefile.in Wed Jan 8 18:21:30 2003 @@ -18,7 +18,7 @@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@-@VERSION@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. @@ -205,19 +205,22 @@ $(sample_drivers_src) libp2edrvstd_la_LIBADD = -L. libpstoedit.la +libp2edrvstd_la_LDFLAGS = -module libp2edrvlplot_la_SOURCES = drvlplot.cpp drvlplot.h libp2edrvlplot_la_LIBADD = $(LIBPLOTTER_LDFLAGS) -L. libpstoedit.la +libp2edrvlplot_la_LDFLAGS = -module libp2edrvswf_la_SOURCES = drvswf.cpp drvswf.h libp2edrvswf_la_LIBADD = $(LIBMING_LDFLAGS) -L. libpstoedit.la +libp2edrvswf_la_LDFLAGS = -module libp2edrvmagick___la_SOURCES = drvmagick++.cpp drvmagick++.h libp2edrvmagick___la_LIBADD = -L. libpstoedit.la -libp2edrvmagick___la_LDFLAGS = ${LIBMAGICK_LDFLAGS} +libp2edrvmagick___la_LDFLAGS = ${LIBMAGICK_LDFLAGS} -module libp2edrvwmf_la_SOURCES = drvwmf.cpp drvwmf.h -libp2edrvwmf_la_LDFLAGS = ${LIBEMF_LDFLAGS} -L. libpstoedit.la +libp2edrvwmf_la_LDFLAGS = ${LIBEMF_LDFLAGS} -L. libpstoedit.la -module libpstoedit_la_SOURCES = \ dynload.cpp dynload.h \ @@ -271,14 +274,12 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) $(pkglib_LTLIBRARIES) -libp2edrvlplot_la_LDFLAGS = libp2edrvlplot_la_DEPENDENCIES = libpstoedit.la am_libp2edrvlplot_la_OBJECTS = drvlplot.lo libp2edrvlplot_la_OBJECTS = $(am_libp2edrvlplot_la_OBJECTS) libp2edrvmagick___la_DEPENDENCIES = libpstoedit.la am_libp2edrvmagick___la_OBJECTS = drvmagick++.lo libp2edrvmagick___la_OBJECTS = $(am_libp2edrvmagick___la_OBJECTS) -libp2edrvstd_la_LDFLAGS = libp2edrvstd_la_DEPENDENCIES = libpstoedit.la am__objects_1 = drvgnplt.lo drvtgif.lo drvfig.lo drvidraw.lo am__objects_2 = drvsampl.lo @@ -287,14 +288,12 @@ drvsk.lo drvmpost.lo drvmma.lo drvlatex2e.lo drvpic.lo \ drvhpgl.lo drvtk.lo $(am__objects_1) $(am__objects_2) libp2edrvstd_la_OBJECTS = $(am_libp2edrvstd_la_OBJECTS) -libp2edrvswf_la_LDFLAGS = libp2edrvswf_la_DEPENDENCIES = libpstoedit.la am_libp2edrvswf_la_OBJECTS = drvswf.lo libp2edrvswf_la_OBJECTS = $(am_libp2edrvswf_la_OBJECTS) libp2edrvwmf_la_LIBADD = am_libp2edrvwmf_la_OBJECTS = drvwmf.lo libp2edrvwmf_la_OBJECTS = $(am_libp2edrvwmf_la_OBJECTS) -libpstoedit_la_LDFLAGS = libpstoedit_la_DEPENDENCIES = am_libpstoedit_la_OBJECTS = dynload.lo callgs.lo lexyy.lo miscutil.lo \ cbstream.lo psimage.lo drvbase.lo base64writer.lo poptions.lo \ diff -Naur pstoedit-3.33.orig/src/dynload.cpp pstoedit-3.33/src/dynload.cpp --- pstoedit-3.33.orig/src/dynload.cpp Tue Jan 7 06:21:15 2003 +++ pstoedit-3.33/src/dynload.cpp Wed Jan 8 14:42:46 2003 @@ -24,7 +24,7 @@ // we need __linux__ instead of just linux since the latter is not defined when -ansi is used. -#if defined(__sparc) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__OS2__) || (HAVE_DLFCN_H==1) +#if defined(_WIN32) || HAVE_DLFCN_H #define HAVESHAREDLIBS #endif @@ -44,17 +44,13 @@ // for DriverDescription types. typedef void (*initfunctype) (); -#if defined(__linux) || defined(__linux__) -#include -// static const char * const libsuffix = ".so"; -#elif defined(__FreeBSD__) -#include -#elif defined(__hpux) -#include -#elif defined(__sparc) -#if defined(__SVR4) -#include -#else + +#if HAVE_SYS_TYPES_H +#include +#endif + +#if defined(__sparc) +#if !defined(__SVR4) // prototypes under SunOS 4.1.x are not compatible with C++ extern "C" { void *dlopen(const char *pathname, int mode); @@ -64,11 +60,7 @@ } #define RTLD_LAZY 1 #endif -// typedef void (*initfunctype) (); -#elif defined(__OS2__) -#include -#include -// typedef void (*initfunctype) (); + #elif defined(_WIN32) static char dlerror() { @@ -79,6 +71,8 @@ #define WINLOADLIB LoadLibrary #define WINFREELIB FreeLibrary // static const char * const libsuffix = ".dll"; +#elif HAVE_DLFCN_H +#include #else #error "system unsupported so far" #endif @@ -100,19 +94,7 @@ strcpy(fulllibname, libname_P); // not needed strcat(fulllibname_P,libsuffix); -#if defined(__linux) || defined(__linux__) - int loadmode = RTLD_LAZY; // RTLD_NOW - handle = dlopen(fulllibname, loadmode); -#elif defined(__FreeBSD__) - int loadmode = RTLD_LAZY; // RTLD_NOW - handle = dlopen(fulllibname, loadmode); -#elif defined(__hpux) - int loadmode = RTLD_LAZY; // RTLD_NOW - handle = dlopen(fulllibname, loadmode); -#elif defined(__sparc) - int loadmode = RTLD_LAZY; // RTLD_NOW - handle = dlopen(fulllibname, loadmode); -#elif defined(__OS2__) +#if HAVE_DLFCN_H int loadmode = RTLD_LAZY; // RTLD_NOW handle = dlopen(fulllibname, loadmode); #elif defined(_WIN32) @@ -144,15 +126,7 @@ void DynLoader::close() { if (handle) { -#if defined(__linux) || defined(__linux__) - dlclose(handle); -#elif defined(__FreeBSD__) - dlclose(handle); -#elif defined(__hpux) - dlclose(handle); -#elif defined(__sparc) - dlclose(handle); -#elif defined(__OS2__) +#if HAVE_DLFCN_H dlclose(handle); #elif defined(_WIN32) WINFREELIB((HINSTANCE) handle); @@ -175,15 +149,7 @@ DynLoader::fptr DynLoader::getSymbol(const char *name, int check) const { -#if defined(__linux) || defined(__linux__) - DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast -#elif defined(__FreeBSD__) - DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast -#elif defined(__hpux) - DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast -#elif defined(__sparc) - DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast -#elif defined(__OS2__) +#if HAVE_DLFCN_H DynLoader::fptr rfptr = (DynLoader::fptr) dlsym(handle, name); //lint !e611 //: Suspicious cast #elif defined(_WIN32) DynLoader::fptr rfptr = (DynLoader::fptr) GetProcAddress((HINSTANCE) handle, name); //lint !e611 //: Suspicious cast @@ -265,7 +231,7 @@ } -#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__sparc) || defined(__hpux) || defined(__OS2__) +#if !defined(_WIN32) // for directory search #if HAVE_DIRENT_H #include diff -Naur pstoedit-3.33.orig/src/miscutil.cpp pstoedit-3.33/src/miscutil.cpp --- pstoedit-3.33.orig/src/miscutil.cpp Tue Jan 7 06:21:15 2003 +++ pstoedit-3.33/src/miscutil.cpp Wed Jan 8 14:21:48 2003 @@ -26,7 +26,7 @@ // #ifdef _MSC_VER // for getcwd ( at least for Visual C++) -#if defined(unix) || defined(__unix__) || defined(_unix) || defined(__unix) || defined(__EMX__) || defined (NetBSD) +#if defined(unix) || defined(__unix__) || defined(_unix) || defined(__unix) || defined(__EMX__) || defined (NetBSD) || defined(__APPLE__) #include #ifdef __hpux