-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
39 lines (35 loc) · 947 Bytes
/
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
#
# configure.ac
#
# Copyright (c) 2020 by Christian Lorenz
#
# Process this file with autoconf to produce a configure script.
#
AC_INIT([LatencyTest], [m4_esyscmd_s([cat VERSION])])
AC_CONFIG_SRCDIR([.])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
# static
AC_ARG_ENABLE(static,
[ --enable-static enable static build],
STATIC_ENABLED="$enableval",STATIC_ENABLED=no)
AM_CONDITIONAL(STATIC_ENABLED, test "$STATIC_ENABLED" = yes)
#######################################
#
# CFLAGS & LIBS
#
PKGCONFIG_FLAGS=""
if test "$STATIC_ENABLED" = yes; then
PKGCONFIG_FLAGS="--static"
CFLAGS="$CFLAGS --static"
fi
CFLAGS="$CFLAGS -g -fno-strict-aliasing -fPIC -Wall -Wno-deprecated-declarations"
CFLAGS="$CFLAGS -D_GNU_SOURCE"
CFLAGS="$CFLAGS $( pkg-config gtk+-3.0 $PKGCONFIG_FLAGS --cflags )"
LIBS="$LIBS $( pkg-config gtk+-3.0 $PKGCONFIG_FLAGS --libs )"
#
# find all Makefiles
#
AC_CONFIG_FILES([ Makefile ])
AC_OUTPUT