]> git.sur5r.net Git - kconfig-frontends/blob - configure.ac
8712973b741cfaa2c6a9ce56cd098a7e95f6599b
[kconfig-frontends] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.67])
5 AC_INIT([kconfig-frontends], [m4_esyscmd_s([cat .version])], [nobody@nowhere.org])
6 AC_CONFIG_SRCDIR([frontends/conf/conf.c])
7 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_AUX_DIR([scripts])
9
10 # Checks for programs.
11 AC_PROG_CXX
12 AC_PROG_CC
13 AC_PROG_MAKE_SET
14 AC_PROG_RANLIB
15
16 AM_INIT_AUTOMAKE
17 AM_PROG_CC_C_O
18 AC_PROG_LEX
19 AC_PROG_YACC
20 AC_CHECK_PROGS(
21     [GPERF],
22     [gperf])
23 AS_IF(
24     [test -z "$GPERF"],
25     [AC_MSG_ERROR([can not find gperf])])
26 AC_SUBST([AM_LFLAGS], ["-L -P zconf"])
27 AC_SUBST([AM_YFLAGS], ["-t -l -p zconf"])
28
29 # Checks for libraries.
30
31 # Checks for header files.
32 AC_CHECK_HEADERS([ fcntl.h libintl.h limits.h locale.h stdlib.h string.h sys/time.h unistd.h ])
33
34 # Checks for typedefs, structures, and compiler characteristics.
35 AC_HEADER_STDBOOL
36 AC_C_INLINE
37 AC_TYPE_SIZE_T
38
39 # Checks for library functions.
40 AC_FUNC_MALLOC
41 AC_FUNC_REALLOC
42 AC_CHECK_FUNCS([ bzero gettimeofday memmove memset mkdir regcomp setlocale strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr strspn strtol uname ])
43
44 #----------------------------------------
45 AC_C_INLINE
46 AC_HEADER_STDC
47 AC_FUNC_MALLOC
48 AC_FUNC_REALLOC
49 AC_FUNC_ALLOCA
50
51 #----------------------------------------
52 # Check for gettext, for the kconfig frontends
53 AC_SUBST([gettext])
54 AC_CHECK_HEADERS(
55     [libintl.h],
56     [ac_ct_gettext_hdr=$ac_header; break])
57 AS_IF(
58     [test -n "$ac_ct_gettext_hdr"],
59     [AC_CHECK_DECL(
60         [gettext],[gettext=y],,
61         [#include <$ac_ct_gettext_hdr>])])
62
63 #----------------------------------------
64 # Check for ncurses, for the kconfig frontends
65 AC_SUBST([CURSES_LOC])
66 AC_CHECK_HEADERS(
67     [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
68     [CURSES_LOC=$ac_header; break])
69 AS_IF(
70     [test -z "$CURSES_LOC"],
71     [AC_MSG_ERROR([could not find curses header, required for the kconfig frontends])])
72 AC_SEARCH_LIBS(
73     [initscr],
74     [ncursesw ncurses curses],
75     [ac_ct_curses_lib_found=yes; break])
76 AS_IF(
77     [test -z "$ac_ct_curses_lib_found"],
78     [AC_MSG_ERROR([could not find curses library, required for the kconfig frontends])])
79
80
81
82 AC_CONFIG_FILES([
83     Makefile
84     lxdialog/Makefile
85     parser/Makefile
86     frontends/Makefile
87     frontends/conf/Makefile
88     frontends/mconf/Makefile
89     frontends/nconf/Makefile
90 ])
91 AC_OUTPUT