-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
61 lines (51 loc) · 1.81 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT(ccscope, 1.1.0, [email protected], ccscope,
https://github.com/notogawa/ccscope)
AM_INIT_AUTOMAKE([foreign -W -Wall -Wno-portability])
AC_CONFIG_SRCDIR([src/ccscope.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
# Checks for libraries.
PKG_CHECK_MODULES(PFICOMMON, [pficommon >= 1.0],
ccsope_cv_have_pficommon="yes",
ccsope_cv_have_pficommon="no")
if test "x$ccsope_cv_have_pficommon" = "xno"
then
AC_MSG_ERROR([pficommon is not found])
fi
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
# Treat warnings as errors
CFLAGS="${CFLAGS} -Wall -Wextra -Werror -ansi -pedantic"
CXXFLAGS="${CXXFLAGS} -Wall -Wextra -Werror -pedantic"
# Check for -Wno-error=unused-parameter
AC_CACHE_CHECK([for gcc -Wno-error=unused-parameter support],
ac_cv_c_gcc_no_error_unused_parameter,
ac_cv_c_gcc_no_error_unused_parameter="undefined")
if test "x$ac_cv_c_gcc_no_error_unused_parameter" = "xundefined"
then
AX_GCC_OPTION([-Wno-error=unused-parameter],[],[],
ac_cv_c_gcc_no_error_unused_parameter="yes",
ac_cv_c_gcc_no_error_unused_parameter="no")
fi
if test "x$ac_cv_c_gcc_no_error_unused_parameter" = "xyes"
then
CFLAGS="${CFLAGS} -Wno-error=unused-parameter"
CXXFLAGS="${CXXFLAGS} -Wno-error=unused-parameter"
else
CFLAGS="${CFLAGS} -Wno-unused-parameter"
CXXFLAGS="${CXXFLAGS} -Wno-unused-parameter"
fi
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT