Annotation of gnutrition/configure.ac, revision 1.4
1.1 asm 1: # SPDX-License-Identifier: GPL-3.0-or-later
2: #
1.4 ! asm 3: # $Id: configure.ac,v 1.3 2026/05/17 20:30:05 asm Exp $
1.1 asm 4: #
5: # configure.ac for GNUtrition
6: #
7: # Copyright (C) 2026 Free Software Foundation, Inc.
8: #
9: # Author: Jason Self <jself@gnu.org>
10: # Anton McClure <asm@gnu.org>
11:
12: AC_INIT([gnutrition], m4_esyscmd_s([./version.sh]), [bug-gnutrition@gnu.org], [gnutrition], [http://www.gnu.org/software/gnutrition/])
13: AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
14:
15: # Checks for programs.
16: AC_PROG_CC
17:
18: # Use C99.
19: CFLAGS="${CFLAGS:-} -D_POSIX_C_SOURCE=200809L -std=c99"
20:
21: # Checks for header files.
22: AC_CHECK_HEADERS([stdio.h stdlib.h string.h ctype.h errno.h getopt.h libgen.h locale.h])
23:
24: # Checks for library functions.
25: AC_CHECK_FUNCS([strdup strerror getopt_long setlocale])
26:
27: # Check for math library.
28: AC_CHECK_LIB([m], [fmod])
29:
30: # Check for SQLite3.
31: PKG_CHECK_MODULES([SQLITE3], [sqlite3])
32:
33: # Check for ncurses.
34: PKG_CHECK_MODULES([NCURSES], [ncurses])
35:
36: # Optional: GTK 3 for the GUI binary.
37: PKG_CHECK_MODULES([GTK], [gtk+-3.0], [have_gtk=yes], [have_gtk=no])
38:
39: # Optional: GIO 2 for D-Bus support in the GUI binary.
40: PKG_CHECK_MODULES([GIO], [gio-2.0], [have_gio=yes], [have_gio=no])
1.2 asm 41: AM_CONDITIONAL([BUILD_GTK], [test "x$have_gtk" = xyes -a "x$have_gio" = xyes])
1.1 asm 42:
1.2 asm 43: # Optional: TexInfo tools.
1.3 asm 44: AC_CHECK_PROGS([MAKEINFO], [makeinfo], [no])
45: AC_CHECK_PROGS([TEXIHTML], [texi2html], [no])
46: AC_CHECK_PROGS([TEXIPDF], [texi2pdf], [no])
47: AM_CONDITIONAL([HAVE_TEXINFO], [test "$MAKEINFO" != "no" && test "$TEXIHTML" != "no" && test "$TEXIPDF" != "no"])
1.1 asm 48:
1.4 ! asm 49: # Optional: check if local manual copies should get install
! 50: AM_CONDITIONAL([INSTALL_HTML], [test -f "$srcdir/gnutrition.html"])
! 51: AM_CONDITIONAL([INSTALL_PDF], [test -f "$srcdir/gnutrition.pdf"])
! 52:
1.1 asm 53: AC_CONFIG_FILES([Makefile])
54: AC_CONFIG_HEADERS([config.h])
55: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>