Commit a009ef76 authored by cristy's avatar cristy

git-svn-id:...

git-svn-id: https://subversion.imagemagick.org/subversion/ImageMagick/trunk@2738 aa41f4f7-0bf4-0310-aa73-e5a19afd5a74
parent 975e7c9f
......@@ -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
......
......@@ -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',
......
......@@ -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
......
......@@ -10,22 +10,22 @@
<configure name="LIB_VERSION" value="0x664"/>
<configure name="LIB_VERSION_NUMBER" value="6,6,4,6"/>
<configure name="RELEASE_DATE" value="2010-09-23"/>
<configure name="CONFIGURE" value="./configure '--without-threads'"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
<configure name="VERSION" value="6.6.4"/>
<configure name="CC" value="gcc -std=gnu99 -std=gnu99"/>
<configure name="CFLAGS" value="-g -O2 -Wall"/>
<configure name="CFLAGS" value="-fopenmp -g -O2 -Wall -pthread"/>
<configure name="CPPFLAGS" value="-I/usr/local/include/ImageMagick"/>
<configure name="PCFLAGS" value=""/>
<configure name="PCFLAGS" value="-fopenmp"/>
<configure name="DEFS" value="-DHAVE_CONFIG_H"/>
<configure name="LDFLAGS" value="-L/usr/local/lib "/>
<configure name="LIBS" value="-lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lltdl"/>
<configure name="LIBS" value="-lMagickCore -ltiff -lfreetype -ljasper -ljpeg -lpng -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lm -lgomp -lpthread -lltdl"/>
<configure name="CXX" value="g++"/>
<configure name="CXXFLAGS" value="-g -O2"/>
<configure name="CXXFLAGS" value="-g -O2 -pthread"/>
<configure name="DISTCHECK_CONFIG_FLAGS" value="--disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no"/>
<configure name="HOST" value="x86_64-unknown-linux-gnu"/>
<configure name="FEATURES" value=""/>
<configure name="FEATURES" value="OpenMP "/>
<configure name="DELEGATES" value="bzlib fontconfig freetype jpeg jng jp2 png tiff x11 xml zlib"/>
<configure name="COPYRIGHT" value="Copyright (C) 1999-2010 ImageMagick Studio LLC"/>
<configure name="WEBSITE" value="http://www.imagemagick.org"/>
......
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -180,7 +180,7 @@ extern "C" {
#include <signal.h>
#include <assert.h>
#if defined(MAGICKCORE_HAVE_PTHREAD)
#if defined(MAGICKCORE_THREAD_SUPPORT)
# include <pthread.h>
#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
# define MAGICKCORE_HAVE_WINTHREADS 1
......
......@@ -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)
......
......@@ -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);
......
......@@ -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;
......
......@@ -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"
......
......@@ -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
......
......@@ -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
......@@ -190,7 +190,7 @@ extern "C" {
#include <signal.h>
#include <assert.h>
#if defined(MAGICKCORE_HAVE_PTHREAD)
#if defined(MAGICKCORE_THREAD_SUPPORT)
# include <pthread.h>
#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
# define MAGICKCORE_HAVE_WINTHREADS 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment