forked from sailfishos/libiphb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
71 lines (56 loc) · 1.9 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
# Package name and version
AC_INIT(libiphb, 1.2.8)
AM_INIT_AUTOMAKE([subdir-objects])
AC_PREREQ([2.61])
AC_CONFIG_SRCDIR([src/libiphb.c])
# NOTE: Must the LT version must be changed when code is released:
# - If interfaces changed/added/removed: lt_current++, lt_rev=0
# - If interfaces added: lt_age++
# - If Interfaces removed: lt_age=0
# - If only code changes (interface untouched): lt_rev++
iphb_lt_current=0
iphb_lt_rev=0
iphb_lt_age=0
AC_SUBST([IPHB_LT_VERSION],[$iphb_lt_current:$iphb_lt_rev:$iphb_lt_age])
#
# Compiler and linker flags
#
AC_DEFINE_UNQUOTED([PRG_VERSION],[$VERSION],[Version for libiphb])
# FIXME: DSME_LOG_ENABLE should be proper&working configure option
#AC_DEFINE([DSME_LOG_ENABLE], [1])
AC_SUBST(C_GENFLAGS, ["-pthread -g -std=c99 -Wall -Wextra -Wwrite-strings -Wmissing-prototypes -Werror"])
AC_SUBST(C_OPTFLAGS, ["-O2 -s"])
AC_SUBST(C_DBGFLAGS, ["-g -DDEBUG -DDSME_LOG_ENABLE"])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_INIT
PKG_PROG_PKG_CONFIG
# Specify dir for local macros
AC_CONFIG_MACRO_DIR([m4])
# Enable per-target compiler options
AM_PROG_CC_C_O()
# Pkgconf checks
PKG_CHECK_MODULES(GLIB, glib-2.0)
PKG_CHECK_MODULES(DBUS, dbus-1)
PKG_CHECK_MODULES(MCE, mce)
# Check libs (that are not yet checked)
AC_CHECK_LIB([dsme], [dsmesock_init], [AC_MSG_NOTICE([got libdsme])], AC_MSG_FAILURE([libdsme required!]), [$GLIB_LIBS])
# Check headers
AC_CHECK_HEADERS([arpa/inet.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_SIZE_T
# Check common library functions
AC_FUNC_MALLOC
AC_CHECK_FUNCS([inet_ntoa memset select socket strerror])
# Create files
AC_CONFIG_FILES([Makefile
src/Makefile
src/libiphb-uninstalled.pc
src/libiphb.pc
dbus-gmain/Makefile
tests/Makefile])
AC_OUTPUT