-
Notifications
You must be signed in to change notification settings - Fork 70
/
configure.ac
91 lines (74 loc) · 2.69 KB
/
configure.ac
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([CASM],
m4_esyscmd([tr -d '\n' < ./casm_version.txt]),
[],
[https://github.com/prisms-center/CASMcode])
AC_CONFIG_AUX_DIR([build-aux]) #This is my doing
AC_CONFIG_MACRO_DIR([build-aux/m4])
#Rules to apply to every Makefile.am. Using tar-ustar due to loooooong file names (I'm looking at you Eigen)
AM_INIT_AUTOMAKE([foreign subdir-objects 1.9 tar-ustar])
AC_CONFIG_SRCDIR([src/casm/crystallography])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
## Checks for libraries.
AC_SEARCH_LIBS([dlopen], [dl], [], AC_MSG_ERROR(dlopen from dl library not found!))
AX_CHECK_ZLIB(,[AC_MSG_ERROR([Could not find zlib])])
#I added this
LT_INIT([shared disable-static])
AC_PROG_LIBTOOL
LT_LIB_DLLOAD
AC_DISABLE_STATIC
# AX_CXX_COMPILE_STDCXX_11
AX_CXX_COMPILE_STDCXX_17
BOOSTV=1.66
AX_BOOST_BASE([$BOOSTV],[],AC_MSG_ERROR(You need Boost $BOOSTV libraries or higher.))
AX_BOOST_FILESYSTEM
AX_BOOST_SYSTEM
AX_BOOST_REGEX
AX_BOOST_CHRONO
AX_BOOST_PROGRAM_OPTIONS
#Where to install bash completion
AC_ARG_WITH([bash-completion-dir],
AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
[Install the bash auto-completion script in this directory. @<:@default=no@:>@]),
[],
[with_bash_completion_dir=no])
if test "x$with_bash_completion_dir" = "xyes"; then
PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0],
[BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"],
[BASH_COMPLETION_DIR="$datadir/bash-completion/completions"])
else
BASH_COMPLETION_DIR="$with_bash_completion_dir"
fi
AC_SUBST([BASH_COMPLETION_DIR])
AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"])
#Require at least this version
AM_PATH_PYTHON([2.6])
# Checks for header files.
AC_CHECK_HEADERS([float.h limits.h stdlib.h string.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_TYPE_UINT64_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_HEADER_MAJOR
AC_FUNC_REALLOC
AC_FUNC_STRTOD
AC_CHECK_FUNCS([floor iswprint memmove memset mkdir pow rmdir select sqrt strchr strpbrk strrchr strstr strtol])
#Generate all the necessary files from *.in
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([tests/functional/FCC_NiAl_Hstrain_enumeration/run.sh],[chmod +x tests/functional/FCC_NiAl_Hstrain_enumeration/run.sh])
AC_OUTPUT