-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
42 lines (38 loc) · 1.03 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
#
# 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
AC_PROG_CXX
# 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
#
if test "$STATIC_ENABLED" = yes; then
CFLAGS="$CFLAGS --static"
LDFLAGS="$LDFLAGS --static"
fi
CFLAGS="$CFLAGS -g -fno-strict-aliasing -fPIC -Wall"
CFLAGS="$CFLAGS -D_GNU_SOURCE"
CFLAGS="$CFLAGS "
LIBS="$LIBS -lfltk"
if test "$STATIC_ENABLED" = yes; then
LIBS="$LIBS -lXinerama -lXcursor -lxkbcommon -lXfixes -lXft -lX11-xcb -lfontconfig -lexpat -lfreetype -lpng16 -lXrender -lXext -lX11 -lxcb -lXau -lXdmcp -lm -ldl -lz -luuid -lpthread -pthread"
fi
#
# find all Makefiles
#
AC_CONFIG_FILES([ Makefile ])
AC_OUTPUT