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