-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
51 lines (41 loc) · 1.24 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT([gldemo], [0.1], [[email protected]])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/frontend/example.cc])
AC_CONFIG_HEADERS([config.h])
# Add picky CXXFLAGS
CXX17_FLAGS="-std=c++17 -pthread"
PICKY_CXXFLAGS="-Wpedantic -Wall -Wextra -Weffc++ -Werror"
AC_SUBST([CXX17_FLAGS])
AC_SUBST([PICKY_CXXFLAGS])
# Change default CXXflags
: ${CXXFLAGS="-g -Ofast -march=native"}
# Checks for programs.
AC_PROG_CXX
AC_PROG_RANLIB
AC_PATH_PROG([CLANG_FORMAT], [clang-format], [])
AS_IF([test x"$CLANG_FORMAT" = x],
[AC_MSG_ERROR([cannot find clang-format])])
# Checks for libraries.
PKG_CHECK_MODULES([GL], [gl])
PKG_CHECK_MODULES([GLU], [glu])
PKG_CHECK_MODULES([GLFW3], [glfw3])
PKG_CHECK_MODULES([GLEW], [glew])
PKG_CHECK_MODULES([PANGOCAIRO], [pangocairo])
# Checks for header files.
AC_LANG_PUSH(C++)
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CXX17_FLAGS"
CPPFLAGS="$save_CPPFLAGS"
AC_LANG_POP(C++)
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([
Makefile
src/Makefile
src/util/Makefile
src/frontend/Makefile
])
AC_OUTPUT