summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-06-01 17:29:37 +0200
committerRomain Bouvier <skunnyk@alteroot.org>2020-06-04 19:54:45 +0200
commitcaed69490485466132348afe283a2e80ab371ed1 (patch)
tree7b990e85eaf4cae5894a79ff7a7507c38a6511a9 /configure.ac
parente19cc0f79b3a577ef1e3ab1220c47ed640362a6e (diff)
downloadxfce4-dev-tools-caed69490485466132348afe283a2e80ab371ed1.tar.gz
Implement XDT_VERSION_INIT
Add an XDT_VERSION_INIT help macro that will define a set of version macros using esyscmd so we no lnger need to use configure.ac.in to perpare the version string for AC_INIT. XDT_VERSION_INIT(SEMVER, [TAG] will set the following macros: - xdt_version - xdt_version_major - xdt_version_minor - xdt_version_micro - xdt_version_tag - xdt_version_build - xdt_debug_default Example usage: XDT_VERSION_INIT([4.15.3],[git]) AC_INIT([xfce4-someproject], [xdt_version()]) ... XDT_FEATURE_DEBUG([xdt_debug_default])
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac83
1 files changed, 83 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..4398556
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,83 @@
+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>.
+dnl
+
+dnl ***************************
+dnl *** Version information ***
+dnl ***************************
+
+XDT_VERSION_INIT([4.14.0])
+
+dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT
+dnl # YOU ARE DOING.
+
+
+dnl ***************************
+dnl *** Initialize autoconf ***
+dnl ***************************
+AC_INIT([xfce4-dev-tools], [xdt_version],
+ [https://bugzilla.xfce.org/enter_bug.cgi?product=Xfce4-dev-tools])
+AC_COPYRIGHT([Copyright (c) 2002-2019 The Xfce development team. All rights reserved.])
+AC_CONFIG_MACRO_DIR([m4])
+AC_REVISION([xdt_version_build])
+
+dnl substitute version info
+AC_SUBST([VERSION_MAJOR], [xdt_version_major])
+AC_SUBST([VERSION_MINOR], [xdt_version_minor])
+AC_SUBST([VERSION_MICRO], [xdt_version_micro])
+VERSION_REVISION=ifelse(xdt_version_tag(), [git], [xdt_version_tag()-xdt_version_build()], [])
+AC_SUBST([VERSION_REVISION])
+
+dnl ***************************
+dnl *** Initialize automake ***
+dnl ***************************
+AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar no-dist-gzip foreign])
+AM_MAINTAINER_MODE()
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+dnl ********************************
+dnl *** Check for basic programs ***
+dnl ********************************
+AC_PROG_CC()
+AM_PROG_CC_C_O()
+AC_PROG_INSTALL()
+
+dnl The libtool version is not only used here, but also in a warning
+dnl in the xdt-autogen script (to not confuse developers using
+dnl xfce4-dev-tools). Maybe one day this warning will become obsolete,
+dnl then it is safe to only use the version directly in the LT_PREREQ
+dnl statement, until then it is necessary to define it as is.
+m4_define([xdt_version_libtool], [2.4])
+AC_SUBST([VERSION_LIBTOOL], [xdt_version_libtool])
+LT_PREREQ(xdt_version_libtool())
+LT_INIT([disable-static])
+
+dnl ***************************************
+dnl *** Check for standard header files ***
+dnl ***************************************
+AC_HEADER_STDC()
+AC_CHECK_HEADERS([libintl.h locale.h memory.h stdio.h stdlib.h string.h])
+
+dnl ***********************************
+dnl *** Check for required packages ***
+dnl ***********************************
+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.42.0])
+
+dnl **********************
+dnl *** Generate files ***
+dnl **********************
+AC_OUTPUT([
+Makefile
+m4macros/Makefile
+scripts/Makefile
+scripts/xdt-autogen.in
+xdt-csource/Makefile
+docs/Makefile
+tests/Makefile
+tests/data/Makefile
+])
+
+dnl vi:set ts=2 sw=2 et ai: