rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
-cp -a www/source $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{VERSION}
+cp -a www/source $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
rm $RPM_BUILD_ROOT%{_libdir}/*.la
# fix weird perl Magick.so permissions
%files doc
%defattr(-,root,root,-)
-%doc %{_datadir}/doc/%{name}-%{VERSION}
+%doc %{_datadir}/doc/%{name}
%doc LICENSE
%files c++
prefix=/usr/local
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
usage='Usage: Magick++-config [--cppflags] [--cxxflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]
echo '7.0.0 Q16 '
;;
--cflags)
- echo "-I${includedir} -fopenmp"
+ pkg-config --cflags Magick++
;;
--cxxflags)
- echo '-g -O2 -pthread'
+ pkg-config --cflags Magick++
;;
--cppflags)
- echo '-I/usr/local/include/ImageMagick'
+ pkg-config --cflags Magick++
;;
--ldflags)
- echo '-L/usr/local/lib -L/usr/lib'
+ pkg-config --libs Magick++
;;
--libs)
- echo "-L${libdir} -lMagick++ -lMagickWand -lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -ldjvulibre -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread "
+ pkg-config --libs Magick++
;;
*)
echo "${usage}" 1>&2
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-#ifndef MAGICKCORE_BUILD_MODULES
-#define MAGICKCORE_BUILD_MODULES 1
-#endif
+/* #undef BUILD_MODULES */
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
#endif
/* Define if you have FFTW library */
-#ifndef MAGICKCORE_FFTW_DELEGATE
-#define MAGICKCORE_FFTW_DELEGATE 1
-#endif
+/* #undef FFTW_DELEGATE */
/* Location of filter modules */
#ifndef MAGICKCORE_FILTER_PATH
#endif
/* Define to 1 if you have the <CL/cl.h> header file. */
-#ifndef MAGICKCORE_HAVE_CL_CL_H
-#define MAGICKCORE_HAVE_CL_CL_H 1
-#endif
+/* #undef HAVE_CL_CL_H */
/* Define to 1 if you have the <complex.h> header file. */
#ifndef MAGICKCORE_HAVE_COMPLEX_H
#endif
/* Define if you have the <lcms2.h> header file. */
-/* #undef HAVE_LCMS2_H */
+#ifndef MAGICKCORE_HAVE_LCMS2_H
+#define MAGICKCORE_HAVE_LCMS2_H 1
+#endif
/* Define if you have the <lcms2/lcms2.h> header file. */
/* #undef HAVE_LCMS2_LCMS2_H */
/* Define if you have the <lcms.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS_H
-#define MAGICKCORE_HAVE_LCMS_H 1
-#endif
+/* #undef HAVE_LCMS_H */
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
#define MAGICKCORE_HAVE_PTHREAD 1
#endif
+/* Have PTHREAD_PRIO_INHERIT. */
+#ifndef MAGICKCORE_HAVE_PTHREAD_PRIO_INHERIT
+#define MAGICKCORE_HAVE_PTHREAD_PRIO_INHERIT 1
+#endif
+
/* Define to 1 if you have the `pwrite' function. */
#ifndef MAGICKCORE_HAVE_PWRITE
#define MAGICKCORE_HAVE_PWRITE 1
#endif
/* Define if you have JBIG library */
-#ifndef MAGICKCORE_JBIG_DELEGATE
-#define MAGICKCORE_JBIG_DELEGATE 1
-#endif
+/* #undef JBIG_DELEGATE */
/* Define if you have JPEG version 2 "Jasper" library */
#ifndef MAGICKCORE_JP2_DELEGATE
#endif
/* Define if you have LQR library */
-#ifndef MAGICKCORE_LQR_DELEGATE
-#define MAGICKCORE_LQR_DELEGATE 1
-#endif
+/* #undef LQR_DELEGATE */
/* Define if using libltdl to support dynamically loadable modules */
#ifndef MAGICKCORE_LTDL_DELEGATE
/* Define to the system default library search path. */
#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/opt/intel/lib/intel64:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/tracker-0.12:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
#endif
/* The archive extension */
/* #undef NO_MINUS_C_MINUS_O */
/* Define if you have OPENEXR library */
-#ifndef MAGICKCORE_OPENEXR_DELEGATE
-#define MAGICKCORE_OPENEXR_DELEGATE 1
-#endif
+/* #undef OPENEXR_DELEGATE */
/* Name of package */
#ifndef MAGICKCORE_PACKAGE
#endif
/* Define if you have RSVG library */
-#ifndef MAGICKCORE_RSVG_DELEGATE
-#define MAGICKCORE_RSVG_DELEGATE 1
-#endif
+/* #undef RSVG_DELEGATE */
/* Define to the type of arg 1 for `select'. */
#ifndef MAGICKCORE_SELECT_TYPE_ARG1
#endif
/* Define if you have WEBP library */
-#ifndef MAGICKCORE_WEBP_DELEGATE
-#define MAGICKCORE_WEBP_DELEGATE 1
-#endif
+/* #undef WEBP_DELEGATE */
/* Define to use the Windows GDI32 library */
/* #undef WINGDI32_DELEGATE */
/* #undef WITH_DMALLOC */
/* Define if you have WMF library */
-#ifndef MAGICKCORE_WMF_DELEGATE
-#define MAGICKCORE_WMF_DELEGATE 1
-#endif
+/* #undef WMF_DELEGATE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "exported"
+#define MagickSVNRevision "5733"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 7,0,0
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
/* Define to 1 if you have the `pwrite' function. */
#undef HAVE_PWRITE
<configure name="VERSION" value="7.0.0"/>
<configure name="LIB_VERSION" value="0x700"/>
<configure name="LIB_VERSION_NUMBER" value="7,0,0,0"/>
- <configure name="SVN_REVISION" value="5659" />
- <configure name="RELEASE_DATE" value="2011-10-18"/>
- <configure name="CONFIGURE" value="./configure '--disable-shared'"/>
+ <configure name="SVN_REVISION" value="5733" />
+ <configure name="RELEASE_DATE" value="2011-10-23"/>
+ <configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
<configure name="CONFIGURE_PATH" value="/usr/local/etc/ImageMagick/"/>
<configure name="PCFLAGS" value="-fopenmp"/>
<configure name="DEFS" value="-DHAVE_CONFIG_H"/>
<configure name="LDFLAGS" value="-L/usr/local/lib -L/usr/lib"/>
- <configure name="LIBS" value="-lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -ldjvulibre -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread "/>
+ <configure name="LIBS" value="-lMagickCore -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng12 -ldjvulibre -lfontconfig -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lgvc -lgraph -lcdt -lz -lm -lgomp -lpthread -lltdl"/>
<configure name="CXX" value="g++"/>
<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"/>
MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
-MAGICK_SVN_REVISION=5659
+MAGICK_SVN_REVISION=5733
if test "$with_threads" != 'no'; then
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
- *-darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
- ;;
+ *-darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
+ ;;
esac
if test x"$ax_pthread_ok" = xno; then
PTHREAD_CFLAGS="$flag"
;;
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
set dummy pthread-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
fi
- if test x"$ax_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
- static void routine(void* a) {a=0;}
- static void* start_routine(void* a) {return a;}
+ static void routine(void *a) { a = 0; }
+ static void *start_routine(void *a) { return a; }
int
main ()
{
pthread_t th; pthread_attr_t attr;
- pthread_create(&th,0,start_routine,0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0);
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */
;
return 0;
}
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
$as_echo_n "checking for joinable pthread attribute... " >&6; }
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
main ()
{
-int attr=$attr; return attr;
+int attr = $attr; return attr /* ; */
;
return 0;
}
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- done
+ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
$as_echo "$attr_name" >&6; }
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <pthread.h>
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_PTHREAD_PRIO_INHERIT=yes
+else
+ ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+
+$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+fi
+
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
+ if test x"$GCC" != xyes; then
for ac_prog in xlc_r cc_r
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
else
PTHREAD_CC=$CC
- fi
+ fi
else
PTHREAD_CC="$CC"
fi
# Enable support for OpenCL
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
- *-darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
- ;;
+ *-darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
+ ;;
esac
if test x"$ax_pthread_ok" = xno; then
PTHREAD_CFLAGS="$flag"
;;
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
set dummy pthread-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
fi
- if test x"$ax_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
- static void routine(void* a) {a=0;}
- static void* start_routine(void* a) {return a;}
+ static void routine(void *a) { a = 0; }
+ static void *start_routine(void *a) { return a; }
int
main ()
{
pthread_t th; pthread_attr_t attr;
- pthread_create(&th,0,start_routine,0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0);
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */
;
return 0;
}
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
$as_echo_n "checking for joinable pthread attribute... " >&6; }
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
int
main ()
{
-int attr=$attr; return attr;
+int attr = $attr; return attr /* ; */
;
return 0;
}
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- done
+ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
$as_echo "$attr_name" >&6; }
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <pthread.h>
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_PTHREAD_PRIO_INHERIT=yes
+else
+ ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+
+$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+fi
+
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
+ if test x"$GCC" != xyes; then
for ac_prog in xlc_r cc_r
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
else
PTHREAD_CC=$CC
- fi
+ fi
else
PTHREAD_CC="$CC"
fi
OBJDUMP="objdump"
# Whether or not to build shared libraries.
-build_libtool_libs=no
+build_libtool_libs=yes
# Whether or not to build static libraries.
build_old_libs=yes
pic_mode=default
# Whether or not to optimize for fast installation.
-fast_install=needless
+fast_install=yes
# The host system.
host_alias=
compiler_c_o="yes"
# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=yes
+build_libtool_need_lc=no
# Whether or not to disallow shared libs when runtime libs are static.
allow_libtool_libs_with_static_runtimes=no
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+# PTHREAD_CFLAGS.
+#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
+# Updated for Autoconf 2.68 by Daniel Richard G.
+#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 11
+#serial 16
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
+AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
- *-darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
- ;;
+ *-darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
+ ;;
esac
if test x"$ax_pthread_ok" = xno; then
PTHREAD_CFLAGS="$flag"
;;
- pthread-config)
- AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
- if test x"$ax_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
+ pthread-config)
+ AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
- AC_TRY_LINK([#include <pthread.h>
- static void routine(void* a) {a=0;}
- static void* start_routine(void* a) {return a;}],
- [pthread_t th; pthread_attr_t attr;
- pthread_create(&th,0,start_routine,0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0); ],
- [ax_pthread_ok=yes])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+ static void routine(void *a) { a = 0; }
+ static void *start_routine(void *a) { return a; }],
+ [pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */])],
+ [ax_pthread_ok=yes],
+ [])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- AC_MSG_CHECKING([for joinable pthread attribute])
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
- [attr_name=$attr; break])
- done
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [int attr = $attr; return attr /* ; */])],
+ [attr_name=$attr; break],
+ [])
+ done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
+ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+ ax_cv_PTHREAD_PRIO_INHERIT, [
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
+ [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+ [ax_cv_PTHREAD_PRIO_INHERIT=no])
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+ AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
+
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with xlc_r or cc_r
- if test x"$GCC" != xyes; then
+ if test x"$GCC" != xyes; then
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
else
PTHREAD_CC=$CC
- fi
+ fi
else
PTHREAD_CC="$CC"
fi
ax_pthread_ok=no
$2
fi
-AC_LANG_RESTORE
+AC_LANG_POP
])dnl AX_PTHREAD