forked from ShanghaiNovotech/open-tbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
68 lines (53 loc) · 1.88 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_CONFIG_MACRO_DIR(m4)
m4_define([tbox_logger_major_version], [1])
m4_define([tbox_logger_minor_version], [0])
m4_define([tbox_logger_micro_version], [0])
m4_define([tbox_logger_version], [tbox_logger_major_version.tbox_logger_minor_version.tbox_logger_micro_version])
AC_INIT([TBoxLogger], [tbox_logger_version])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
TBOX_LOGGER_MAJOR_VERSION=tbox_logger_major_version
TBOX_LOGGER_MINOR_VERSION=tbox_logger_minor_version
TBOX_LOGGER_MICRO_VERSIOn=tbox_logger_micro_version
TBOX_LOGGER_VERSION=tbox_logger_version
TBOX_LOGGER_LIB_VERSION=tbox_logger_lib_version
AC_DEFINE(TBOX_LOGGER_MAJOR_VERSION, [tbox_logger_major_version],
[Define to the Luna Pudge Server major version])
AC_DEFINE(TBOX_LOGGER_MINOR_VERSION, [tbox_logger_minor_version],
[Define to the Luna Pudge Server minor version])
AC_DEFINE(TBOX_LOGGER_MICRO_VERSION, [tbox_logger_micro_version],
[Define to the Luna Pudge Server micro version])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
CFLAGS="-Wall"
# Checks for libraries.
AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.32, gthread-2.0 >= 2.32, \
gmodule-2.0 >= 2.32, gio-2.0 >= 2.32])
PKG_CHECK_MODULES([JSONC], [json-c >= 0.11])
PKG_CHECK_MODULES([LIBGPS], [libgps >= 3.0])
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], \
[enable debug mode by default]), enable_debug=yes, \
enable_debug=no)
AM_CONDITIONAL(DEBUG_MODE, test "x$enable_debug" = "xyes")
# Checks for headers
AC_SUBST(TBOX_LOGGER_VERSION)
AC_CONFIG_FILES(
Makefile src/Makefile
)
AC_OUTPUT
echo "
$PACKAGE $VERSION
configure complete, now type 'make'
"