-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfigure.ac
More file actions
54 lines (43 loc) · 1.6 KB
/
configure.ac
File metadata and controls
54 lines (43 loc) · 1.6 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
dnl Process this file with autoconf to produce a configure script.
dnl
dnl This file is free software; as a special exception the author gives
dnl unlimited permission to copy and/or distribute it, with or without
dnl modifications, as long as this notice is preserved.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
m4_ifndef([_VERSION_M4_INCLUDED], [
m4_define([_VERSION_M4_INCLUDED], 1)
m4_include([version.m4])
])
AC_INIT([blackjack],[libreblackjackversion],[jeremy@seamplex.com])
AM_INIT_AUTOMAKE
# AM_GNU_GETTEXT([external])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CANONICAL_HOST
AC_PROG_CXX
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug], [Compile with debugging symbols])],
[enable_debug=$enableval], [enable_debug=no])
######################
# default optimization flags
AS_IF([test "x$CXXFLAGS" = "x-g -O2"],
AS_IF([test "x$with_debug" = "xyes" -o "x$enable_debug" = "xyes"] , [
CXXFLAGS="-g -O0"
AC_DEFINE([DEBUG], [1], [Define to 1 if debugging is enabled])
],[
CXXFLAGS="-O3 -flto=auto"
])
)
AC_CHECK_HEADER([readline/readline.h])
AC_CHECK_LIB([readline], [readline])
AC_MSG_NOTICE([creating version-conf.h])
cat << EOF > src/version-conf.h
#define COMPILATION_ARCH "${host_os} ${host_cpu}"
#define COMPILER_VERSION "`$CXX --version | head -n1`"
#define COMPILER_CXXFLAGS "$CXXFLAGS"
EOF
#AC_CONFIG_FILES([Makefile doc/Makefile po/Makefile.in])
AC_CONFIG_FILES([Makefile doc/Makefile])
AC_OUTPUT