summaryrefslogtreecommitdiff
path: root/configure.ac.in
blob: 2725970a1b115df0f26084d909d3a14d5fd37b7a (plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
dnl $Id$
dnl
dnl Copyright (c) 2002-2019
dnl         The Xfce development team. All rights reserved.
dnl
dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>, Jasper
dnl Huijsmans <jasper@xfce.org> and Olivier Fourdan <fourdan@xfce.org>.
dnl

dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([libxfce4util_verinfo], [7:0:0])
m4_define([libxfce4util_version_major], [4])
m4_define([libxfce4util_version_minor], [17])
m4_define([libxfce4util_version_micro], [2])
m4_define([libxfce4util_version_nano], [])   dnl leave this empty to have no nano version
m4_define([libxfce4util_version_build], [@REVISION@])
m4_define([libxfce4util_version_tag], [git])
m4_define([libxfce4util_version], [libxfce4util_version_major().libxfce4util_version_minor().libxfce4util_version_micro()ifelse(libxfce4util_version_nano(), [], [], [.libxfce4util_version_nano()])ifelse(libxfce4util_version_tag(), [git], [libxfce4util_version_tag()-libxfce4util_version_build()], [])])

dnl **************************************************************
dnl *** Overall Xfce version, modify this when making releases ***
dnl **************************************************************
m4_define([xfce_version_string], [4.16])


dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
dnl # YOU ARE DOING.


dnl ********************************************
dnl *** Full debug support for GIT snapshots ***
dnl ********************************************
m4_define([libxfce4util_debug_default], [ifelse(libxfce4util_version_tag(), [git], [yes], [minimum])])

dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
AC_COPYRIGHT([Copyright (c) 2002-2019
        The Xfce development team. All rights reserved.])
AC_INIT([libxfce4util], [libxfce4util_version], [xfce4-dev@xfce.org])
AC_PREREQ([2.69])
AC_REVISION([libxfce4util_version_build])

dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
LIBXFCE4UTIL_VERSION=libxfce4util_version()
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar no-dist-gzip foreign])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
AM_MAINTAINER_MODE()
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

dnl **************************
dnl *** Libtool versioning ***
dnl **************************
LIBXFCE4UTIL_VERINFO=libxfce4util_verinfo()
AC_SUBST([LIBXFCE4UTIL_VERINFO])

dnl **********************************
dnl *** Subst overall Xfce version ***
dnl **********************************
AC_DEFINE([XFCE_VERSION_STRING], ["xfce_version_string"],
  [Overall Xfce version])

dnl **********************************
dnl *** Subst libxfce4util version ***
dnl **********************************
LIBXFCE4UTIL_VERSION_MAJOR=libxfce4util_version_major()
LIBXFCE4UTIL_VERSION_MINOR=libxfce4util_version_minor()
LIBXFCE4UTIL_VERSION_MICRO=libxfce4util_version_micro()
AC_SUBST([LIBXFCE4UTIL_VERSION_MAJOR])
AC_SUBST([LIBXFCE4UTIL_VERSION_MINOR])
AC_SUBST([LIBXFCE4UTIL_VERSION_MICRO])

dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
AC_USE_SYSTEM_EXTENSIONS

dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
AC_PROG_CC()
AM_PROG_CC_C_O()
AC_PROG_INSTALL()
IT_PROG_INTLTOOL([0.35.0])
AC_CHECK_PROGS([PERL], [perl5 perl])

dnl **************************
dnl *** Initialize libtool ***
dnl **************************
LT_PREREQ([2.2.6])
LT_INIT([disable-static])

dnl ***************************************
dnl *** Check for standard header files ***
dnl ***************************************
AC_CHECK_HEADERS([err.h errno.h grp.h limits.h locale.h pwd.h \
                  signal.h sys/stat.h sys/types.h sys/utsname.h \
                  time.h unistd.h stdarg.h varargs.h libintl.h])
AC_CHECK_FUNCS([gethostname getpwnam setlocale strdup \
                bind_textdomain_codeset])

dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
XDT_I18N([])

dnl ***********************************
dnl *** Check for GObject installed ***
dnl ***********************************
XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.56.0])

dnl ********************************
dnl *** Check for GLib installed ***
dnl ********************************
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.56.0])

dnl ********************************
dnl *** Check for GIO installed ***
dnl ********************************
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.56.0])

dnl *************************
dnl *** Check for gtk-doc ***
dnl *************************
GTK_DOC_CHECK([1.20])

dnl ***************************************
dnl *** Check for gobject-introspection ***
dnl ***************************************
GOBJECT_INTROSPECTION_CHECK([1.30.0])

dnl *************************
dnl *** Check for vapigen ***
dnl *************************
VAPIGEN_CHECK()

dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
XDT_FEATURE_DEBUG([libxfce4util_debug_default])

dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
XDT_FEATURE_LINKER_OPTS()

dnl *****************************************
dnl *** Check for ELF visibility support  ***
dnl *****************************************
dnl *** Do not replace with the Xdt macro ***
dnl *** because it cannot cope with the   ***
dnl *** libxfce4util_*_version variables  ***
dnl *****************************************
AC_ARG_ENABLE([visibility], AS_HELP_STRING([--disable-visibility], [Do not use ELF visibility attributes]), [], [enable_visibility=yes])
have_gnuc_visibility=no
if test x"$enable_visibility" != x"no"; then
  dnl Check whether the compiler supports the visibility attribute
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -Wall -Werror"
  AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
  AC_COMPILE_IFELSE([AC_LANG_SOURCE(
  [
    void test_default (void);
    void test_hidden (void);

    void __attribute__ ((visibility("default"))) test_default (void) {}
    void __attribute__ ((visibility("hidden"))) test_hidden (void) {}

    int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
  ])],
  [
    have_gnuc_visibility=yes
    AC_MSG_RESULT([yes])
  ],
  [
    AC_MSG_RESULT([no])
  ])
  CFLAGS="$save_CFLAGS"
fi
if test x"$have_gnuc_visibility" = x"yes"; then
  CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
fi
AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])

dnl *****************************
dnl *** Generate output files ***
dnl *****************************
AC_CONFIG_FILES([
Makefile
docs/Makefile
docs/reference/Makefile
libxfce4util/libxfce4util-1.0.pc
libxfce4util/libxfce4util-config.h
libxfce4util/Makefile
po/Makefile.in
xfce4-kiosk-query/Makefile
])
AC_OUTPUT

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
echo "* Debug Support:  $enable_debug"
echo "* GNU Visibility: $have_gnuc_visibility"
echo