Merge pull request #22 from leigh123linux/update-configure
Migrate away from gnome-common deprecated vars and macros
Clement Lefebvre authored 6 years ago
GitHub committed 6 years ago
0 | 0 |
#!/bin/sh
|
|
1 |
# Run this to generate all the initial makefiles, etc.
|
|
2 |
test -n "$srcdir" || srcdir=$(dirname "$0")
|
|
3 |
test -n "$srcdir" || srcdir=.
|
1 | 4 |
|
2 | |
srcdir=`dirname $0`
|
3 | |
test -z "$srcdir" && srcdir=.
|
|
5 |
olddir=$(pwd)
|
4 | 6 |
|
5 | |
which gnome-autogen.sh || {
|
6 | |
echo "You need to install gnome-common from GNOME Git (or from"
|
7 | |
echo "your OS vendor's package manager)."
|
|
7 |
cd $srcdir
|
|
8 |
|
|
9 |
(test -f configure.ac) || {
|
|
10 |
echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
|
8 | 11 |
exit 1
|
9 | 12 |
}
|
10 | |
. gnome-autogen.sh
|
|
13 |
|
|
14 |
# shellcheck disable=SC2016
|
|
15 |
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
|
|
16 |
|
|
17 |
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
|
|
18 |
echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
|
|
19 |
echo "*** If you wish to pass any to it, please specify them on the" >&2
|
|
20 |
echo "*** '$0' command line." >&2
|
|
21 |
echo "" >&2
|
|
22 |
fi
|
|
23 |
|
|
24 |
mkdir -p m4
|
|
25 |
|
|
26 |
glib-gettextize --force --copy || exit 1
|
|
27 |
gtkdocize --copy || exit 1
|
|
28 |
intltoolize --force --copy --automake || exit 1
|
|
29 |
autoreconf --verbose --force --install || exit 1
|
|
30 |
|
|
31 |
cd "$olddir"
|
|
32 |
if [ "$NOCONFIGURE" = "" ]; then
|
|
33 |
$srcdir/configure "$@" || exit 1
|
|
34 |
|
|
35 |
if [ "$1" = "--help" ]; then exit 0 else
|
|
36 |
echo "Now type 'make' to compile $PKG_NAME" || exit 1
|
|
37 |
fi
|
|
38 |
else
|
|
39 |
echo "Skipping configure process."
|
|
40 |
fi
|
|
41 |
|
0 | 0 |
|
1 | 1 |
AC_INIT(xapp, 1.0.2)
|
2 | 2 |
AC_CONFIG_SRCDIR(libxapp)
|
|
3 |
m4_ifdef([AX_IS_RELEASE], [AX_IS_RELEASE([always])])
|
3 | 4 |
|
4 | 5 |
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
|
5 | 6 |
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
7 | 8 |
AC_CONFIG_HEADERS([config.h])
|
8 | 9 |
|
9 | 10 |
AC_CONFIG_MACRO_DIR([m4])
|
|
11 |
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
|
10 | 12 |
|
11 | 13 |
# Before making a release, the LT_VERSION string should be modified.
|
12 | 14 |
# The string is of the form C:R:A.
|
|
27 | 29 |
AC_PROG_CC
|
28 | 30 |
PKG_PROG_PKG_CONFIG
|
29 | 31 |
|
|
32 |
m4_ifdef([AX_COMPILER_FLAGS],
|
|
33 |
[AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])])
|
|
34 |
|
30 | 35 |
GTK_DOC_CHECK([1.0],[--flavour=no-tmpl])
|
31 | |
|
32 | |
GNOME_COMPILE_WARNINGS([maximum])
|
33 | |
GNOME_MAINTAINER_MODE_DEFINES
|
34 | 36 |
|
35 | 37 |
AC_ARG_ENABLE(deprecation_flags,
|
36 | 38 |
[AC_HELP_STRING([--enable-deprecation-flags],
|
4 | 4 |
|
5 | 5 |
AM_CPPFLAGS = \
|
6 | 6 |
-I$(top_srcdir) \
|
7 | |
$(XAPP_CFLAGS) \
|
8 | |
$(XLIB_CFLAGS) \
|
|
7 |
$(XAPP_CFLAGS) \
|
|
8 |
$(XLIB_CFLAGS) \
|
|
9 |
$(WARN_CFLAGS) \
|
9 | 10 |
-DG_LOG_DOMAIN=\"XApp\" \
|
10 | 11 |
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale\"" \
|
11 | 12 |
$(DISABLE_DEPRECATED_CFLAGS)
|
|
25 | 26 |
-lrt
|
26 | 27 |
|
27 | 28 |
libxapp_la_LDFLAGS = \
|
|
29 |
$(WARN_LDFLAGS) \
|
28 | 30 |
-version-info $(LT_VERSION) \
|
29 | 31 |
-export-symbols-regex "^xapp_.*" \
|
30 | 32 |
-no-undefined
|
|
48 | 50 |
XApp_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
|
49 | 51 |
XApp_1_0_gir_PACKAGES = gdk-pixbuf-2.0 glib-2.0 gobject-2.0 gio-2.0 gtk+-3.0
|
50 | 52 |
XApp_1_0_gir_EXPORT_PACKAGES = xapp
|
51 | |
XApp_1_0_gir_CFLAGS = -I$(top_srcdir) -DWITH_INTROSPECTION
|
|
53 |
XApp_1_0_gir_CFLAGS = $(WARN_CFLAGS) -I$(top_srcdir) -DWITH_INTROSPECTION
|
52 | 54 |
XApp_1_0_gir_LIBS = libxapp.la
|
53 | 55 |
XApp_1_0_gir_FILES = $(introspection_sources) $(libxapp_HEADERS)
|
54 | |
XApp_1_0_gir_SCANNERFLAGS = --identifier-prefix=XApp --symbol-prefix=xapp_
|
|
56 |
XApp_1_0_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS) --identifier-prefix=XApp --symbol-prefix=xapp_
|
55 | 57 |
INTROSPECTION_GIRS += XApp-1.0.gir
|
56 | 58 |
|
57 | 59 |
girdir = $(datadir)/gir-1.0
|