-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·84 lines (65 loc) · 2.17 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# This file is part of Task-Aware HIP and is licensed under the terms contained in the COPYING and COPYING.LESSER files.
#
# Copyright (C) 2021 Barcelona Supercomputing Center (BSC)
AC_PREREQ([2.69])
AC_INIT([tahip], [2.0.0], [pm-tools@bsc.es])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([config.h])
AC_LANG([C++])
# Prepare compilation flags before AC_PROG_CXX
AX_COMPILE_FLAGS
AC_PROG_CXX
# Retrieve compiler version
AX_CHECK_CXX_VERSION
# AM_PROG_AR must be called before LT_INIT or a warning ensues
AM_PROG_AR
# Automake initialization
AM_INIT_AUTOMAKE([foreign -Wall dist-bzip2 -Wno-portability subdir-objects silent-rules])
AM_SILENT_RULES([yes])
# Checks for header files.
AC_CHECK_HEADERS([unistd.h])
# Check for HIP
AX_CHECK_HIP
AX_CHECK_HIPBLAS
# Personalize the installation prefix
AC_ARG_WITH(prefix,
[AS_HELP_STRING([--prefix=PATH],
[specify prefix directory where to install the library])])
# Boost is no longer required
AX_BOOST_BASE([1.59], [], [ AC_MSG_ERROR([Boost library not found])])
# Checks for typedefs, structures, and compiler characteristics.
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
AC_CHECK_HEADER_STDBOOL
AC_TYPE_SIZE_T
AX_CHECK_CPUS
# Turn off shared libraries.
LT_INIT([static])
# Enable/disable architecture specific code
AS_CASE([$host],
[x86_64*],[ARCH=x86_64])
AS_IF([test "$ARCH" = "x86_64"],[
AC_DEFINE([X86_64_ARCH],[1],[Compiling for x86_64 host])
])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
echo ""
echo ""
echo "Configuration summary:"
echo " Compiler version... ${CXX_VERSION}"
echo ""
echo " Installation prefix... ${prefix}"
echo ""
echo " HIP CPPFLAGS... ${hipflags} ${hipinc}"
echo " HIP LDFLAGS... ${hiplibs} ${hiplib}"
echo ""
echo " hipBLAS CPPFLAGS... ${hipblasinc}"
echo " hipBLAS LDFLAGS... ${hipblaslibs} ${hipblaslib}"
echo ""
echo " CXXFLAGS... ${tahip_CXXFLAGS} ${CXXFLAGS}"
echo " CPPFLAGS... ${tahip_CPPFLAGS} ${CPPFLAGS}"
echo ""
echo " Boost CPPFLAGS... ${BOOST_CPPFLAGS}"
echo " Boost LDFLAGS... ${BOOST_LDFLAGS}"