1 # Process this file with autoconf to produce a configure script.
2 AC_INIT([libatomic_ops],[7.2alpha7])
5 AC_CANONICAL_TARGET([])
6 AC_CONFIG_SRCDIR(src/atomic_ops.c)
7 AC_CONFIG_MACRO_DIR([m4])
8 AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
11 AM_CONFIG_HEADER(src/config.h)
13 # Checks for programs.
16 LT_INIT([disable-shared])
18 # Checks for functions.
21 # Determine PIC flag, adjust default CFLAGS
24 AC_MSG_CHECKING(Determining PIC compiler flag)
25 if test "$GCC" = yes; then
30 # Workaround: at least GCC 3.4.6 does not define this macro.
31 CFLAGS="$CFLAGS -D__PIC__=1"
34 # Output all warnings.
35 CFLAGS="$CFLAGS -Wall -Wextra"
41 CFLAGS="$CFLAGS +O2 -mt"
52 # Any Linux compiler had better be gcc compatible.
55 AC_MSG_RESULT("<none>")
59 CFLAGS="$CFLAGS -DNDEBUG"
63 AH_TEMPLATE([_PTHREADS], [Indicates the use of pthreads (NetBSD).])
66 ## Libraries needed to support threads.
67 AC_CHECK_LIB(pthread, pthread_self, THREADDLLIBS="-lpthread",,)
68 AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads.])
73 *-*-openbsd* | *-*-kfreebsd*-gnu | *-*-dgux*)
76 *-*-cygwin* | *-*-darwin*)
80 AC_SUBST(THREADDLLIBS)
82 AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)
89 pkgconfig/atomic_ops.pc
90 pkgconfig/atomic_ops-uninstalled.pc
91 pkgconfig/atomic_ops_as_stdatomic.pc
92 pkgconfig/atomic_ops_as_stdatomic-uninstalled.pc ])
94 AC_CONFIG_COMMANDS([default],[[]],[[