diff --git a/Magick++/bin/Magick++-config b/Magick++/bin/Magick++-config
index 3baf9a3..917a32b 100755
--- a/Magick++/bin/Magick++-config
+++ b/Magick++/bin/Magick++-config
@@ -43,10 +43,10 @@
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 @@
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 e42d967..8178f18 100644
--- a/PerlMagick/Makefile.PL
+++ b/PerlMagick/Makefile.PL
@@ -140,7 +140,7 @@
# 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 @@
# '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 3bfdb65..c99fc41 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 b0c2992..db39548 100644
--- a/config/configure.xml
+++ b/config/configure.xml
@@ -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"/>
diff --git a/configure b/configure
index 38d2f38..35eeccc 100755
--- a/configure
+++ b/configure
@@ -8435,6 +8435,9 @@
$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 d779220..0a40e7b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -369,14 +369,13 @@
# 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 @@
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 aca3e6c..07b6bac 100755
--- a/libtool
+++ b/libtool
@@ -144,7 +144,7 @@
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 @@
# ### 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 @@
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 @@
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_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_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 @@
# 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 @@
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 @@
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 e382aac..7f3df55 100644
--- a/magick/ImageMagick.pc
+++ b/magick/ImageMagick.pc
@@ -7,4 +7,4 @@
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 9a9b9ca..ed47494 100755
--- a/magick/Magick-config
+++ b/magick/Magick-config
@@ -40,10 +40,10 @@
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 @@
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 cfec317..f3aec81 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 bbee776..4abd066 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 inline void LockMagickMutex(void)
{
-#if defined(MAGICKCORE_HAVE_PTHREAD)
+#if defined(MAGICKCORE_THREAD_SUPPORT)
{
int
status;
@@ -55,7 +55,7 @@
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 f206f86..c20a6fb 100644
--- a/magick/semaphore.c
+++ b/magick/semaphore.c
@@ -137,7 +137,7 @@
/*
Initialize the semaphore.
*/
-#if defined(MAGICKCORE_HAVE_PTHREAD)
+#if defined(MAGICKCORE_THREAD_SUPPORT)
{
int
status;
@@ -215,7 +215,7 @@
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 @@
{
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 @@
}
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 657b27e..161bf9d 100644
--- a/magick/studio.h
+++ b/magick/studio.h
@@ -180,7 +180,7 @@
#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
diff --git a/magick/thread-private.h b/magick/thread-private.h
index c642795..a86ebe2 100644
--- a/magick/thread-private.h
+++ b/magick/thread-private.h
@@ -31,7 +31,7 @@
#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 @@
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 size_t GetMagickThreadSignature(void)
{
-#if defined(MAGICKCORE_HAVE_PTHREAD)
+#if defined(MAGICKCORE_THREAD_SUPPORT)
{
union
{
@@ -76,7 +76,7 @@
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 3529e6d..e312644 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 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 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 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 cf189d4..8b7ab5c 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 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 0fdff68..3953976 100644
--- a/magick/version.h
+++ b/magick/version.h
@@ -36,7 +36,7 @@
#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 465ac4a..47228f6 100755
--- a/wand/Wand-config
+++ b/wand/Wand-config
@@ -40,10 +40,10 @@
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 @@
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 62f7884..d72598a 100644
--- a/wand/Wand.pc
+++ b/wand/Wand.pc
@@ -8,4 +8,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 cb63a54..b6f1ef4 100644
--- a/wand/studio.h
+++ b/wand/studio.h
@@ -190,7 +190,7 @@
#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