forked from lavabit/magma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
59 lines (44 loc) · 1.67 KB
/
configure.ac
File metadata and controls
59 lines (44 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Note that this has not been extensively tested with various autoconf
# versions. TODO - determine the minimum autoconf version we will support
AC_PREREQ([2.63])
AC_INIT([magma], [0.1])
# Look for macros in the m4 directory
AC_CONFIG_MACRO_DIR([m4])
# Try to find libcheck using pkg-config
PKG_CHECK_MODULES([CHECK], [check >= 0.9])
# Sanity check to make sure the specified srcdir contains magma.h
AC_CONFIG_SRCDIR([src/magma.h])
# Auxiliary autotools files go here
AC_CONFIG_AUX_DIR([build-aux])
AC_ARG_VAR([MAGMA_SHARED_LIB_DIR], [Directory used to build magmad.so (default=build_lib)])
if test -z "$MAGMA_SHARED_LIB_DIR"; then
MAGMA_SHARED_LIB_DIR=${srcdir}/build_lib
fi
# Note that this has not been extensively tested with various automake
# versions. TODO - determine the minimum automake version we will support.
#
# The foreign option prevents automake from requiring the GNU-specific project
# files like AUTHORS, COPYING, etc.
#
# The subdir-objects option allows source files in subdirectories.
#
# nostdinc disables including srcdir (-I.)
AM_INIT_AUTOMAKE([foreign subdir-objects nostdinc])
# Instruct configure to create Makefile using Makefile.am
AC_CONFIG_FILES([Makefile])
# Find and probe C compiler (use "current" standard)
AC_PROG_CC_STDC
# Find ranlib
AC_PROG_RANLIB
# Define _GNU_SOURCE
AC_GNU_SOURCE
# Handle pthreads (See
# http://stackoverflow.com/questions/17055279/autotools-for-pthreads-not-setting-correct-linker-flags)
AX_PTHREAD([
AC_DEFINE([HAVE_PTHREAD],[1], [Define if you have pthreads.])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"], [])
AC_DEFINE([HAVE_NS_TYPE])
AC_OUTPUT