grim/guifications3
Clone
Summary
Browse
Changes
Graph
closing this since just about everything that can be is converted to cmake, and all newer changes will be maintenance
cmake
2010-12-20, Gary Kramlich
093aeaa24183
closing this since just about everything that can be is converted to cmake, and all newer changes will be maintenance
dnl
Process
this
file
with
autoconf
to
create
configure
.
dnl
################################################################
dnl
#
Initialize
autoconf
dnl
################################################################
AC_INIT
(
gflib
-
unix
,
0.0.1
dev
,
guifications
-
devel
@
lists
.
guifications
.
org
)
AC_PREREQ
(
2.50
)
AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR
(
config
.
h
.
in
)
AC_COPYRIGHT
([
Copyright
2003-2009
Gary
Kramlich
])
dnl
################################################################
dnl
#
Initialize
automake
dnl
################################################################
AM_INIT_AUTOMAKE
([
gnu
dist
-
bzip2
])
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
#######################################################################
LT_INIT
LT_LANG
([
C
])
LIBTOOL
=
"$LIBTOOL --silent"
dnl
#######################################################################
dnl
#
I
'
m
lazy
and
figured
config
.
h
is
the
best
place
for
this
;)
dnl
#######################################################################
AC_DEFINE_UNQUOTED
(
GFLIB_WEBSITE
,
"http://guifications.org/"
,
[
gflib
website
])
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
=
gflib
-
unix
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
#
Look
for
the
C
compiler
dnl
#######################################################################
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
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
#
check
for
some
standard
header
files
dnl
#######################################################################
AC_CHECK_HEADERS
(
getopt
.
h
)
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
gmodule
-2.0
>=
2.14.0
])
AC_SUBST
(
GLIB_CFLAGS
)
AC_SUBST
(
GLIB_LIBS
)
dnl
#######################################################################
dnl
#
check
for
gflib
dnl
#######################################################################
PKG_CHECK_MODULES
(
GFLIB
,
[
gflib
])
AC_SUBST
(
GFLIB_CFLAGS
)
AC_SUBST
(
GFLIB_LIBS
)
if
test
x
"${prefix}"
=
x
"NONE"
;
then
GFLIB_PLUGIN_DIR
=
`
pkg
-
config
--
variable
=
plugin_dir
gflib
`
else
GFLIB_PLUGIN_DIR
=
"${prefix}/lib/guifications/"
fi
AC_SUBST
(
GFLIB_PLUGIN_DIR
)
dnl
#######################################################################
dnl
#
Finish
up
dnl
#######################################################################
AC_OUTPUT
([
Makefile
gflib
-
unix
/
Makefile
po
/
Makefile
.
in
])
dnl
#######################################################################
dnl
#
Ouput
!!
dnl
#######################################################################
echo
;
echo
AC_PACKAGE_NAME
AC_PACKAGE_VERSION
Configuration
complete
echo
;
echo
Debugging
enabled
................
:
$enable_debug
echo
;
echo
gflib
plugin
directory
...........
:
$GFLIB_PLUGIN_DIR
echo
;
echo
Type
make
to
compile
echo
;