grim/gplate
Clone
Summary
Browse
Changes
Graph
ignore tweak to ignore vim swap files
2009-06-22, Gary Kramlich
03c966486496
ignore tweak to ignore vim swap files
dnl
Process
this
file
with
autoconf
to
create
configure
.
dnl
################################################################
dnl
#
Initialize
autoconf
dnl
################################################################
AC_INIT
(
gplate
,
0.0.3
mtn
,
guifications
-
devel
@lists
.
guifications
.
org
)
AC_PREREQ
(
2.50
)
AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR
(
config
.
h
.
in
)
AC_COPYRIGHT
(
[
Copyright 2007-2009 Gary Kramlich
]
)
AM_MAINTAINER_MODE
dnl
################################################################
dnl
#
Version
information
dnl
################################################################
GPLATE_MAJOR_VERSION
=
0
GPLATE_MINOR_VERSION
=
0
GPLATE_MICRO_VERSION
=
3
GPLATE_DEVEL_VERSION
=
0
GPLATE_VERSION
=
$
GPLATE_MAJOR_VERSION
.
$
GPLATE_MINOR_VERSION
.
$
GPLATE_MICRO_VERSION
if
test
"x$GPLATE_DEVEL_VERSION"
!=
"x0"
;
then
if
test
"x$GPLATE_MICRO_VERSION"
=
"x0"
;
then
GPLATE_MICRO_VERSION
=
$
GPLATE_DEVEL_VERSION
GPLATE_VERSION
=
$
GPLATE_MAJOR_VERSION
.
$
GPLATE_MINOR_VERSION
.
$
GPLATE_MICRO_VERSION
else
GPLATE_VERSION
=
$
GPLATE_VERSION
.
$
GPLATE_DEVEL_VERSION
fi
fi
AC_DEFINE_UNQUOTED
(
GPLATE_MAJOR_VERSION
,
$
GPLATE_MAJOR_VERSION
,
[
gflib major version.
]
)
AC_DEFINE_UNQUOTED
(
GPLATE_MINOR_VERSION
,
$
GPLATE_MINOR_VERSION
,
[
gflib minor version.
]
)
AC_DEFINE_UNQUOTED
(
GPLATE_MICRO_VERSION
,
$
GPLATE_MICRO_VERSION
,
[
gflib micro version.
]
)
AC_DEFINE_UNQUOTED
(
GPLATE_VERSION
,
$
GPLATE_VERSION
,
[
gflib version
]
)
AC_DEFINE_UNQUOTED
(
GPLATE_VERSION_S
,
"$GPLATE_VERSION"
,
[
gflib version string
]
)
dnl
################################################################
dnl
#
libtool
versioning
dnl
################################################################
dnl
#
dnl
#
+
1
:
0
:
+
1
==
new
interface
that
does
not
break
old
one
.
dnl
#
+
1
:
0
:
0
==
removed
an
interface
.
Breaks
old
apps
.
dnl
#
?
:
+
1
:
?
==
internal
changes
that
doesn
'
t
break
anything
.
dnl
#
dnl
#
CURRENT
:
REVISION
:
AGE
dnl
#
LT_CURRENT
=
0
LT_REVISION
=
0
LT_AGE
=
0
LT_RELEASE
=
$
GPLATE_MAJOR_VERSION
.
$
GPLATE_MINOR_VERSION
.
$
GPLATE_MICRO_VERSION
AC_SUBST
(
LT_RELEASE
)
AC_SUBST
(
LT_CURRENT
)
AC_SUBST
(
LT_REVISION
)
AC_SUBST
(
LT_AGE
)
dnl
################################################################
dnl
#
Initialize
automake
dnl
################################################################
AM_INIT_AUTOMAKE
(
[
gnu dist-bzip2 dist-zip check-news
]
)
dnl
################################################################
dnl
#
Configuration
file
dnl
################################################################
AM_CONFIG_HEADER
(
config
.
h
)
dnl
#
Stash
configure
args
AC_DEFINE_UNQUOTED
(
CONFIG_ARGS
,
"$ac_configure_args"
,
[
configure arguments
]
)
#
set
our
language
to
C
AC_LANG
(
[
C
]
)
dnl
#######################################################################
dnl
#
Make
sure
we
have
pkg
-
config
dnl
#######################################################################
PKG_PROG_PKG_CONFIG
dnl
#######################################################################
dnl
#
Setup
libtool
dnl
#######################################################################
AM_PROG_LIBTOOL
LIBTOOL
=
"$LIBTOOL --silent"
dnl
#######################################################################
dnl
#
Our
header
dnl
#######################################################################
AH_TOP
(
[
/* our header */
#ifndef CONFIG_H
#define CONFIG_H
]
)
AH_BOTTOM
(
[
#endif /* CONFIG_H */
]
)
dnl
#######################################################################
dnl
#
INTLTOOL
dnl
#######################################################################
AC_PROG_INTLTOOL
GETTEXT_PACKAGE
=
gplate
AC_SUBST
(
GETTEXT_PACKAGE
)
AC_DEFINE_UNQUOTED
(
GETTEXT_PACKAGE
,
[
"$GETTEXT_PACKAGE"
]
,
[
Define the gettext package to be used
]
)
ALL_LINGUAS
=
""
AM_GLIB_GNU_GETTEXT
dnl
#######################################################################
dnl
#
helper
apps
dnl
#######################################################################
AC_PATH_PROG
(
XMLLINT
,
[
xmllint
]
,
[
yes
]
,
[
no
]
)
AM_CONDITIONAL
(
USE_XMLLINT
,
test
x
"$XMLLINT"
=
x
"yes"
)
AC_PATH_PROG
(
XSLTPROC
,
[
xsltproc
]
,
[
yes
]
,
[
no
]
)
AM_CONDITIONAL
(
USE_XSLTPROC
,
test
x
"$XSLTPROC"
=
x
"yes"
)
AC_PATH_PROG
(
FDP
,
[
fdp
]
,
[
yes
]
,
[
no
]
)
AM_CONDITIONAL
(
USE_FDP
,
test
x
"$FDP"
=
x
"yes"
)
AC_PATH_PROG
(
LCOV
,
[
lcov
]
,
[
yes
]
,
[
no
]
)
AM_CONDITIONAL
(
USE_LCOV
,
test
x
"$LCOV"
=
x
"yes"
)
AC_PATH_PROG
(
FIGLET
,
[
figlet
]
)
dnl
#######################################################################
dnl
#
Look
for
the
C
compiler
dnl
#######################################################################
AC_MSG_CHECKING
(
[
useful C based templating library so I do not have to write one
]
)
AC_MSG_RESULT
(
no
)
CFLAGS_save
=
"$CFLAGS"
AC_PROG_CC
CFLAGS
=
"$CFLAGS_save"
AC_ARG_ENABLE
(
debug
,
AC_HELP_STRING
(
[
--enable-debug
]
,
[
compile with debugging support
]
)
,,
enable_debug
=
no
)
if
test
x
"$enable_debug"
=
x
"yes"
;
then
CFLAGS
=
"$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
AC_DEFINE
(
DEBUG
,
1
,
[
Define if debugging is enabled.
]
)
fi
if
test
x
"$GCC"
=
x
"yes"
;
then
CFLAGS
=
"$CFLAGS -Wall -g3"
fi
AC_SUBST
(
CFLAGS
)
dnl
#######################################################################
dnl
#
do
we
want
to
build
the
tests
?
dnl
#######################################################################
AC_ARG_ENABLE
(
tests
,
AC_HELP_STRING
(
[
--enable-tests
]
,
[
build test programs
]
)
,,
enable_tests
=
no
)
CHECK_CFLAGS
=
CHECK_LIBS
=
if
test
x
"$enable_tests"
=
x
"yes"
;
then
PKG_CHECK_MODULES
(
CHECK
,
[
check >= 0.9.4
]
,
enable_tests
=
yes
,
enable_tests
=
no
)
fi
AC_SUBST
(
CHECK_CFLAGS
)
AC_SUBST
(
CHECK_LIBS
)
AM_CONDITIONAL
(
BUILD_TESTS
,
test
x
"$enable_tests"
=
x
"yes"
)
dnl
#######################################################################
dnl
#
check
for
glib
and
other
glib
dependencies
dnl
#######################################################################
PKG_CHECK_MODULES
(
GLIB
,
[
glib-2.0 >= 2.14.0 gobject-2.0 >= 2.14.0
]
)
AC_SUBST
(
GLIB_CFLAGS
)
AC_SUBST
(
GLIB_LIBS
)
GLIB_GENMARSHAL
=
`
pkg
-
config
--
variable
=
glib_genmarshal
glib
-
2.0
`
AC_SUBST
(
GLIB_GENMARSHAL
)
dnl
#######################################################################
dnl
#
GtkDoc
stuff
dnl
#######################################################################
GTK_DOC_CHECK
(
[
1.0
]
)
dnl
#######################################################################
dnl
#
Finish
up
dnl
#######################################################################
AC_OUTPUT
(
[
Makefile
gplate.pc
doc/Makefile
doc/gplate/Makefile
doc/gplate/overview.sgml
gplate/Makefile
gplate/configs/Makefile
gplate/functions/Makefile
gplate/tags/Makefile
gplate/variables/Makefile
jhbuild/Makefile
pixmaps/Makefile
po/Makefile.in
tests/Makefile
tests/templates/Makefile
]
)
dnl
#######################################################################
dnl
#
Ouput
!!
dnl
#######################################################################
if
test
x
"$FIGLET"
!=
x
"no"
;
then
$
FIGLET
-
f
small
AC_PACKAGE_NAME
echo
"AC_PACKAGE_VERSION configuration complete"
else
echo
"AC_PACKAGE_NAME AC_PACKAGE_VERSION configuration complete"
fi
echo
"
Debugging enabled: $enable_debug
Build tests: $enable_tests
Build documentation: $enable_gtk_doc
prefix: ${prefix}
libdir: ${libdir}
libexecdir: ${libexecdir}
bindir: ${bindir}
datadir: ${datadir}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
docdir: ${docdir}
compiler: ${CC}
cflags: ${CFLAGS}
cppflags: ${CPPFLAGS}
maintainer mode: ${USE_MAINTAINER_MODE}
Type make to compile
"