]> git.datanom.net - clib.git/blame - configure.ac
init
[clib.git] / configure.ac
CommitLineData
392d65ba
MR
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.72])
5AC_INIT([C library],[0.1.0],[mir@datanom.net])
6AC_COPYRIGHT([Copyright (c) 2024 Michael Rasmussen.])
7AC_CONFIG_MACRO_DIR([m4])
8AC_CONFIG_AUX_DIR(auxdir)
9AC_CANONICAL_TARGET
10
11AC_CONFIG_SRCDIR([src/stack.c])
12AM_INIT_AUTOMAKE([gnu no-dist-gzip dist-bzip2 1.10])
13AM_MAINTAINER_MODE
14
15CFLAGS="-Wall"
16
17if test "x$USE_MAINTAINER_MODE" = "xyes"; then
18 CFLAGS="${CFLAGS} -g -DDEBUG"
19 AC_DEFINE_UNQUOTED(DEBUG, [1], [Enable debug mode.])
20else
21 CFLAGS="${CFLAGS} -O -O2"
22fi
23
24GLIB_REQUIRED=2.50.0
25
26AC_SUBST(GLIB_REQUIRED)
27
28AC_CONFIG_HEADERS(config.h)
29
30# Checks for programs.
31AC_PROG_CC
32AC_PROG_INSTALL
33AC_PROG_LN_S
34AC_PROG_MAKE_SET
35LT_INIT
36
37if test -n "$lt_prog_compiler_pic"; then
38 CFLAGS="$CFLAGS $lt_prog_compiler_pic"
39fi
40
41AC_SYS_LARGEFILE
42
43PKG_PROG_PKG_CONFIG
44AC_LIB_PREFIX
45
46# Checks for libraries.
47PKG_CHECK_MODULES([GLIB],
48 [glib-2.0 >= $GLIB_REQUIRED
49 gobject-2.0 >= $GOBJECT_REQUIRED
50 gmodule-2.0]
51)
52AC_SUBST(GLIB_CFLAGS)
53AC_SUBST(GLIB_LIBS)
54
55# Checks for header files.
56AC_CHECK_HEADER([assert.h],
57 AC_DEFINE([HAVE_ASSERT_H], [1], [Define to 1 if you have the <assert.h> header file.]))
58
59# Checks for typedefs, structures, and compiler characteristics.
60
61# Checks for library functions.
62
63AC_CONFIG_FILES([
64 Makefile
65 src/Makefile
66])
67
68AC_OUTPUT
69echo ""
70echo "$PACKAGE $VERSION"
71echo "
72Configuration:
73
74 Source code: ${ac_pwd}
75 Compiler: ${CC} $($CC -dumpversion)
76 CFLAGS: ${CFLAGS}
77"
78echo ""
79echo "The binary will be installed in $prefix/bin"
80echo ""
81echo "Configure finished, type 'make' to build."
82
This page took 0.058816 seconds and 5 git commands to generate.