forked from l3ib/nitrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·101 lines (83 loc) · 4.47 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
AC_PREREQ(2.69)
AC_INIT([nitrogen],[1.5.2-experimental],[[email protected]])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([.])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADER(config.h)
AC_HEADER_STDC
AC_ISC_POSIX
LD=ld.gold
LDFLAGS+=" -s -Os -m64 -march=native -mtune=native -fPIC -DPIC -rdynamic -fopenmp -fopenmp-simd -ffast-math -fomit-frame-pointer -floop-nest-optimize -floop-parallelize-all -free -fsigned-char -fsigned-bitfields -flto -fuse-linker-plugin -fvisibility=hidden -fsanitize=undefined -freorder-functions -fdiagnostics-color=always -fpredictive-commoning -fgcse-after-reload -ftree-loop-vectorize -ftree-slp-vectorize -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -fmodulo-sched -fmodulo-sched-allow-regmoves -fprofile-dir=/tmp/gcc-pgo/nitrogen"
CFLAGS+=" -std=c11 -Wall -Os -m64 -march=native -mtune=native -fPIC -DPIC -rdynamic -fopenmp -fopenmp-simd -ffast-math -fomit-frame-pointer -floop-nest-optimize -floop-parallelize-all -free -fsigned-char -fsigned-bitfields -flto -fuse-linker-plugin -fvisibility=hidden -fsanitize=undefined -freorder-functions -fdiagnostics-color=always -fpredictive-commoning -fgcse-after-reload -ftree-loop-vectorize -ftree-slp-vectorize -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -fmodulo-sched -fmodulo-sched-allow-regmoves -fprofile-dir=/tmp/gcc-pgo/nitrogen"
CXXFLAGS+=" -std=c++1y -Wall -Os -m64 -march=native -mtune=native -fPIC -DPIC -rdynamic -fopenmp -fopenmp-simd -ffast-math -fomit-frame-pointer -floop-nest-optimize -floop-parallelize-all -free -fsigned-char -fsigned-bitfields -flto -fuse-linker-plugin -fvisibility=hidden -fsanitize=undefined -freorder-functions -fdiagnostics-color=always -fpredictive-commoning -fgcse-after-reload -ftree-loop-vectorize -ftree-slp-vectorize -fvect-cost-model -ftree-partial-pre -fipa-cp-clone -fmodulo-sched -fmodulo-sched-allow-regmoves -fprofile-dir=/tmp/gcc-pgo/nitrogen"
AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_LANG([C++])
AC_LANG_COMPILER_REQUIRE
AC_SUBST(NITROGEN_LIBS)
AC_SUBST(NITROGEN_CFLAGS)
ALL_LINGUAS=""
AM_GNU_GETTEXT_VERSION(0.19)
AM_GNU_GETTEXT([external])
AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Name of gettext locale directory])
dnl
dnl Our depend list
dnl
GLIB2_VERSION=2.40.0
GTK2_VERSION=2.24.0
GTKMM2_VERSION=2.24.0
GTHREAD2_VERSION=2.6.0
AC_SUBST(GLIB2_VERSION)
AC_SUBST(GTK2_VERSION)
PKG_CHECK_MODULES(GLIB2,[glib-2.0 >= $GLIB2_VERSION])
PKG_CHECK_MODULES(GTK2,[gtk+-2.0 >= $GTK2_VERSION])
PKG_CHECK_MODULES(GTKMM2, [gtkmm-2.4 >= $GTKMM2_VERSION])
PKG_CHECK_MODULES(GTHREAD2, [gthread-2.0 >= $GTHREAD2_VERSION])
PKG_CHECK_MODULES(X11, x11)
NITROGEN_LIBS="$GLIB2_LIBS $GTK2_LIBS $GTKMM2_LIBS $GTHREAD2_LIBS $X11_LIBS"
NITROGEN_CFLAGS="$GLIB2_CFLAGS $GTK2_CFLAGS $GTKMM2_CFLAGS $GTHREAD2_CFLAGS $X11_CFLAGS"
dnl checking whether debugging is enabled
AC_ARG_ENABLE(debug, [ --enable-debug enable debugging flags ])
if test "$enable_debug" = "yes"; then
CXXFLAGS+=" -g -g3 -ggdb -DDEBUG";
else
LDFLAGS+=" -s";
fi
dnl apparently we have to check for X11 now
AC_CHECK_LIB(X11, XOpenDisplay, [NITROGEN_LIBS="$NITROGEN_LIBS -lX11"])
dnl do some autotools picen to get inotify
AC_ARG_ENABLE(inotify, [ --disable-inotify disable support for inotify watching of dirs (default: enabled)], [enable_inotify=$enableval],[enable_inotify=yes])
if test x$enable_inotify = xyes; then
AC_DEFINE(USE_INOTIFY, 1, [Define to enable inotify dir watching])
fi
dnl now do some proper checking for Xinerama
AC_ARG_ENABLE(xinerama, [ --disable-xinerama disable support for Xinerama (default: enabled)], [enable_xinerama=$enableval],[enable_xinerama=yes])
if test x$enable_xinerama = xyes; then
AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
[AC_DEFINE(USE_XINERAMA, 1, [Define to enable Xinerama]) NITROGEN_LIBS="$NITROGEN_LIBS -lXinerama"],
[enable_xinerama=no])
fi
AC_CONFIG_FILES(Makefile src/Makefile data/Makefile data/nitrogen.desktop data/icons/Makefile po/Makefile.in)
AC_OUTPUT
dnl syscrash says don't test for inotify support in kernel for some reason
echo ""
echo "##########################################"
echo ""
echo "Options:"
echo ""
if test x$enable_inotify = xyes; then
echo "inotify support ............. enabled"
else
echo "inotify support ............. disabled"
fi
if test x$enable_xinerama = xyes; then
echo "xinerama support ............ enabled"
else
echo "xinerama support ............ disabled"
fi
echo ""
echo "##########################################"
echo ""
echo "You are now ready to compile nitrogen"
echo "Type \"make\" to compile nitrogen"