From: cristy Date: Fri, 24 Sep 2010 00:29:41 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~8817 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55bf91c47050417fb79c8f91a73a4ed1530e34da;p=imagemagick --- diff --git a/Magick++/bin/Magick++-config b/Magick++/bin/Magick++-config index 3baf9a397..917a32b52 100755 --- a/Magick++/bin/Magick++-config +++ b/Magick++/bin/Magick++-config @@ -43,10 +43,10 @@ while test $# -gt 0; do echo '6.6.4 Q16 ' ;; --cflags) - echo "-I${includedir} " + echo "-I${includedir} -fopenmp" ;; --cxxflags) - echo '-g -O2' + echo '-g -O2 -pthread' ;; --cppflags) echo '-I/usr/local/include/ImageMagick' @@ -55,7 +55,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lltdl" + echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread -lltdl" ;; *) echo "${usage}" 1>&2 diff --git a/PerlMagick/Makefile.PL b/PerlMagick/Makefile.PL index e42d96787..8178f18c2 100644 --- a/PerlMagick/Makefile.PL +++ b/PerlMagick/Makefile.PL @@ -140,7 +140,7 @@ foreach $delegate (qw/bzlib fontconfig freetype jpeg jng jp2 png tiff x11 xml zl # defaults for LIBS & INC & CCFLAGS params that we later pass to Writemakefile my $INC_magick = '-I../ -I.. -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/freetype2 -I/usr/include/libxml2 -I"' . $Config{'usrinc'} . '/ImageMagick"'; my $LIBS_magick = '-L../magick/.libs -lMagickCore -lperl -lm'; -my $CCFLAGS_magick = "$Config{'ccflags'} -g -O2 -Wall"; +my $CCFLAGS_magick = "$Config{'ccflags'} -fopenmp -g -O2 -Wall -pthread"; my $LDFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'ldflags'} "; my $LDDLFLAGS_magick = "-L../magick/.libs -lMagickCore $Config{'lddlflags'} "; @@ -210,7 +210,7 @@ WriteMakefile # 'OPTIMIZE' => '', # Use same compiler as ImageMagick - 'PERLMAINCC' => ' ', + 'PERLMAINCC' => ' -fopenmp', # Set Perl installation prefix to ImageMagick installation prefix # 'PREFIX' => '/usr/local', diff --git a/config/config.h.in b/config/config.h.in index 3bfdb65ec..c99fc41ca 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -861,6 +861,9 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Define if you have POSIX threads libraries and header files. */ +#undef THREAD_SUPPORT + /* Define if you have TIFF library */ #undef TIFF_DELEGATE diff --git a/config/configure.xml b/config/configure.xml index b0c29927f..db3954873 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -10,22 +10,22 @@ - + - + - + - + - + - + diff --git a/configure b/configure index 38d2f38af..35eecccf8 100755 --- a/configure +++ b/configure @@ -8435,6 +8435,9 @@ $as_echo "$as_me: WARNING: Replacing compiler $CC with compiler $PTHREAD_CC to s $as_echo "$as_me: WARNING: Replacing compiler $CXX with compiler $PTHREAD_CXX to support pthreads." >&2;} CXX="$PTHREAD_CXX" fi + +$as_echo "#define THREAD_SUPPORT 1" >>confdefs.h + fi fi diff --git a/configure.ac b/configure.ac index d7792208d..0a40e7bee 100755 --- a/configure.ac +++ b/configure.ac @@ -369,14 +369,13 @@ esac # Enable support for threads AC_ARG_WITH([threads], - [AC_HELP_STRING([--without-threads], - [disable threads support])], + [AC_HELP_STRING([--without-threads], [disable threads support])], [with_threads=$withval], [with_threads='yes']) have_threads=no if test "$with_threads" != 'no'; then - AX_PTHREAD() + AX_PTHREAD([]) if test "$ax_pthread_ok" = yes; then have_threads=yes DEF_THREAD="$PTHREAD_CFLAGS" @@ -390,6 +389,7 @@ if test "$with_threads" != 'no'; then AC_MSG_WARN([Replacing compiler $CXX with compiler $PTHREAD_CXX to support pthreads.]) CXX="$PTHREAD_CXX" fi + AC_DEFINE(THREAD_SUPPORT,1,[Define if you have POSIX threads libraries and header files.]) fi fi diff --git a/libtool b/libtool index aca3e6c2b..07b6baca6 100755 --- a/libtool +++ b/libtool @@ -144,7 +144,7 @@ lock_old_archive_extraction=no LTCC="gcc -std=gnu99 -std=gnu99" # LTCC compiler flags. -LTCFLAGS="-g -O2 -Wall" +LTCFLAGS="-fopenmp -g -O2 -Wall -pthread" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" @@ -9261,7 +9261,7 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. -LD="/usr/bin/ld -m elf_x86_64" +LD="" # How to create reloadable object files. reload_flag=" -r" @@ -9271,25 +9271,25 @@ reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib" # A language specific compiler. -CC="g++" +CC="" # Is the compiler the GNU compiler? -with_gcc=yes +with_gcc= # Compiler flag to turn off builtin functions. -no_builtin_flag=" -fno-builtin" +no_builtin_flag="" # How to pass a linker flag through the compiler. -wl="-Wl," +wl="" # Additional compiler flags for building library objects. -pic_flag=" -fPIC -DPIC" +pic_flag="" # Compiler flag to prevent dynamic linking. link_static_flag="" # Does compiler simultaneously support -c and -o options? -compiler_c_o="yes" +compiler_c_o="" # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=no @@ -9298,10 +9298,10 @@ build_libtool_need_lc=no allow_libtool_libs_with_static_runtimes=no # Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec="\${wl}--export-dynamic" +export_dynamic_flag_spec="" # Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" +whole_archive_flag_spec="" # Whether the compiler copes with passing no objects directly. compiler_needs_object="no" @@ -9313,8 +9313,8 @@ old_archive_from_new_cmds="" old_archive_from_expsyms_cmds="" # Commands used to build a shared archive. -archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" -archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" +archive_cmds="" +archive_expsym_cmds="" # Commands used to build a loadable module if different from building # a shared archive. @@ -9322,7 +9322,7 @@ module_cmds="" module_expsym_cmds="" # Whether we are building with GNU ld or not. -with_gnu_ld="yes" +with_gnu_ld="" # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag="" @@ -9332,7 +9332,7 @@ no_undefined_flag="" # Flag to hardcode $libdir into a binary during linking. # This must work even if $libdir does not exist -hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir" +hardcode_libdir_flag_spec="" # If ld is used when linking, flag to hardcode $libdir into a binary # during linking. This must work even if $libdir does not exist. @@ -9378,10 +9378,10 @@ fix_srcfile_path="" always_export_symbols=no # The commands to list exported symbols. -export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" +export_symbols_cmds="" # Symbols that should not be listed in the preloaded symbols. -exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*" +exclude_expsyms="" # Symbols that must always be exported. include_expsyms="" @@ -9393,20 +9393,20 @@ prelink_cmds="" file_list_spec="" # How to hardcode a shared library path into an executable. -hardcode_action=immediate +hardcode_action= # The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs="/usr/lib/gcc/x86_64-redhat-linux/4.5.1 /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../.." +compiler_lib_search_dirs="" # Dependencies to place before and after the objects being linked to # create a shared library. -predep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.5.1/crtbeginS.o" -postdep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.5.1/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/crtn.o" +predep_objects="" +postdep_objects="" predeps="" -postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" +postdeps="" # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path="-L/usr/lib/gcc/x86_64-redhat-linux/4.5.1 -L/usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../.." +compiler_lib_search_path="" # ### END LIBTOOL TAG CONFIG: CXX diff --git a/magick/ImageMagick.pc b/magick/ImageMagick.pc index e382aaca4..7f3df55c3 100644 --- a/magick/ImageMagick.pc +++ b/magick/ImageMagick.pc @@ -7,4 +7,4 @@ Name: ImageMagick Description: ImageMagick - Convert, Edit, and Compose Images Version: 6.6.4 Libs: -L${libdir} -lMagickCore -Cflags: -I${includedir} +Cflags: -I${includedir} -fopenmp diff --git a/magick/Magick-config b/magick/Magick-config index 9a9b9cad6..ed474943c 100755 --- a/magick/Magick-config +++ b/magick/Magick-config @@ -40,10 +40,10 @@ while test $# -gt 0; do echo '6.6.4 Q16 ' ;; --cflags) - echo "-I${includedir} " + echo "-I${includedir} -fopenmp" ;; --cxxflags) - echo '-g -O2' + echo '-g -O2 -pthread' ;; --cppflags) echo '-I/usr/local/include/ImageMagick' @@ -52,7 +52,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lltdl" + echo "-L${libdir} -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread -lltdl" ;; *) echo "${usage}" 1>&2 diff --git a/magick/magick-config.h b/magick/magick-config.h index cfec31781..f3aec81c9 100644 --- a/magick/magick-config.h +++ b/magick/magick-config.h @@ -1292,6 +1292,11 @@ #define MAGICKCORE_STDC_HEADERS 1 #endif +/* Define if you have POSIX threads libraries and header files. */ +#ifndef MAGICKCORE_THREAD_SUPPORT +#define MAGICKCORE_THREAD_SUPPORT 1 +#endif + /* Define if you have TIFF library */ #ifndef MAGICKCORE_TIFF_DELEGATE #define MAGICKCORE_TIFF_DELEGATE 1 diff --git a/magick/semaphore-private.h b/magick/semaphore-private.h index bbee7762e..4abd066ba 100644 --- a/magick/semaphore-private.h +++ b/magick/semaphore-private.h @@ -22,7 +22,7 @@ extern "C" { #endif -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) static pthread_mutex_t semaphore_mutex = PTHREAD_MUTEX_INITIALIZER; #elif defined(MAGICKCORE_HAVE_WINTHREADS) @@ -35,7 +35,7 @@ static ssize_t static inline void LockMagickMutex(void) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; @@ -55,7 +55,7 @@ static inline void LockMagickMutex(void) static inline void UnlockMagickMutex(void) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; diff --git a/magick/semaphore.c b/magick/semaphore.c index f206f8627..c20a6fb8e 100644 --- a/magick/semaphore.c +++ b/magick/semaphore.c @@ -137,7 +137,7 @@ MagickExport SemaphoreInfo *AllocateSemaphoreInfo(void) /* Initialize the semaphore. */ -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; @@ -215,7 +215,7 @@ MagickExport void DestroySemaphoreInfo(SemaphoreInfo **semaphore_info) assert((*semaphore_info) != (SemaphoreInfo *) NULL); assert((*semaphore_info)->signature == MagickSignature); LockMagickMutex(); -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; @@ -261,7 +261,7 @@ MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info) { assert(semaphore_info != (SemaphoreInfo *) NULL); assert(semaphore_info->signature == MagickSignature); -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; @@ -400,7 +400,7 @@ MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info) } semaphore_info->reference_count--; #endif -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) { int status; diff --git a/magick/studio.h b/magick/studio.h index 657b27e41..161bf9d68 100644 --- a/magick/studio.h +++ b/magick/studio.h @@ -180,7 +180,7 @@ extern "C" { #include #include -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) # include #elif defined(MAGICKCORE_WINDOWS_SUPPORT) # define MAGICKCORE_HAVE_WINTHREADS 1 diff --git a/magick/thread-private.h b/magick/thread-private.h index c64279505..a86ebe2de 100644 --- a/magick/thread-private.h +++ b/magick/thread-private.h @@ -31,7 +31,7 @@ extern "C" { #define MagickCachePrefetch(address,mode,locality) #endif -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) typedef pthread_mutex_t MagickMutexType; #elif defined(MAGICKCORE_WINDOWS_SUPPORT) typedef CRITICAL_SECTION MagickMutexType; @@ -41,7 +41,7 @@ extern "C" { static inline MagickThreadType GetMagickThreadId(void) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) return(pthread_self()); #elif defined(MAGICKCORE_WINDOWS_SUPPORT) return(GetCurrentThreadId()); @@ -52,7 +52,7 @@ static inline MagickThreadType GetMagickThreadId(void) static inline size_t GetMagickThreadSignature(void) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) { union { @@ -76,7 +76,7 @@ static inline size_t GetMagickThreadSignature(void) static inline MagickBooleanType IsMagickThreadEqual(const MagickThreadType id) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) if (pthread_equal(id,pthread_self()) != 0) return(MagickTrue); #elif defined(MAGICKCORE_WINDOWS_SUPPORT) diff --git a/magick/thread.c b/magick/thread.c index 3529e6d4f..e3126447f 100644 --- a/magick/thread.c +++ b/magick/thread.c @@ -63,7 +63,7 @@ */ MagickExport MagickBooleanType MagickCreateThreadKey(MagickThreadKey *key) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) return(pthread_key_create(key,NULL) == 0 ? MagickTrue : MagickFalse); #elif defined(MAGICKCORE_HAVE_WINTHREADS) *key=TlsAlloc(); @@ -98,7 +98,7 @@ MagickExport MagickBooleanType MagickCreateThreadKey(MagickThreadKey *key) */ MagickExport MagickBooleanType MagickDeleteThreadKey(MagickThreadKey key) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) return(pthread_key_delete(key) == 0 ? MagickTrue : MagickFalse); #elif defined(MAGICKCORE_HAVE_WINTHREADS) return(TlsFree(key) != 0 ? MagickTrue : MagickFalse); @@ -133,7 +133,7 @@ MagickExport MagickBooleanType MagickDeleteThreadKey(MagickThreadKey key) */ MagickExport void *MagickGetThreadValue(MagickThreadKey key) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) return(pthread_getspecific(key)); #elif defined(MAGICKCORE_HAVE_WINTHREADS) return(TlsGetValue(key)); @@ -170,7 +170,7 @@ MagickExport void *MagickGetThreadValue(MagickThreadKey key) MagickExport MagickBooleanType MagickSetThreadValue(MagickThreadKey key, const void *value) { -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) return(pthread_setspecific(key,value) == 0 ? MagickTrue : MagickFalse); #elif defined(MAGICKCORE_HAVE_WINTHREADS) return(TlsSetValue(key,(void *) value) != 0 ? MagickTrue : MagickFalse); diff --git a/magick/thread_.h b/magick/thread_.h index cf189d401..8b7ab5c03 100644 --- a/magick/thread_.h +++ b/magick/thread_.h @@ -22,7 +22,7 @@ extern "C" { #endif -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) typedef pthread_t MagickThreadType; #elif defined(MAGICKCORE_HAVE_WINTHREADS) typedef DWORD MagickThreadType; @@ -30,7 +30,7 @@ typedef DWORD MagickThreadType; typedef pid_t MagickThreadType; #endif -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) typedef pthread_key_t MagickThreadKey; #elif defined(MAGICKCORE_HAVE_WINTHREADS) typedef DWORD MagickThreadKey; diff --git a/magick/version.h b/magick/version.h index 0fdff68db..395397628 100644 --- a/magick/version.h +++ b/magick/version.h @@ -36,7 +36,7 @@ extern "C" { #define MagickReleaseDate "2010-09-23" #define MagickChangeDate "20100912" #define MagickAuthoritativeURL "http://www.imagemagick.org" -#define MagickFeatures "" +#define MagickFeatures "OpenMP " #define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.6.4/index.html" #if (MAGICKCORE_QUANTUM_DEPTH == 8) #define MagickQuantumDepth "Q8" diff --git a/wand/Wand-config b/wand/Wand-config index 465ac4a2e..47228f64d 100755 --- a/wand/Wand-config +++ b/wand/Wand-config @@ -40,10 +40,10 @@ while test $# -gt 0; do echo '6.6.4 Q16 ' ;; --cflags) - echo "-I${includedir} " + echo "-I${includedir} -fopenmp" ;; --cxxflags) - echo '-g -O2' + echo '-g -O2 -pthread' ;; --cppflags) echo '-I/usr/local/include/ImageMagick' @@ -52,7 +52,7 @@ while test $# -gt 0; do echo '-L/usr/local/lib ' ;; --libs) - echo "-L${libdir} -lMagickWand -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lltdl" + echo "-L${libdir} -lMagickWand -lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread -lltdl" ;; *) echo "${usage}" 1>&2 diff --git a/wand/Wand.pc b/wand/Wand.pc index 62f78841c..d72598a39 100644 --- a/wand/Wand.pc +++ b/wand/Wand.pc @@ -8,4 +8,4 @@ Version: 6.6.4 Description: MagickWand - C API for ImageMagick Requires: ImageMagick Libs: -L${libdir} -lMagickWand -lMagickCore -Cflags: -I${includedir} +Cflags: -I${includedir} -fopenmp diff --git a/wand/studio.h b/wand/studio.h index cb63a5432..b6f1ef47c 100644 --- a/wand/studio.h +++ b/wand/studio.h @@ -190,7 +190,7 @@ extern "C" { #include #include -#if defined(MAGICKCORE_HAVE_PTHREAD) +#if defined(MAGICKCORE_THREAD_SUPPORT) # include #elif defined(MAGICKCORE_WINDOWS_SUPPORT) # define MAGICKCORE_HAVE_WINTHREADS 1