]> git.sur5r.net Git - kconfig-frontends/blob - configure.ac
configure: cleanup
[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 # Use a config.h to avoid brazilions -DHAVE_FOO on compile lines
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_AUX_DIR([scripts])
10
11 # Checks for programs.
12 AC_PROG_CXX
13 AC_PROG_CC
14 AC_PROG_MAKE_SET
15
16 # Checks for libraries.
17 # (none)
18
19 # Checks for header files.
20 AC_HEADER_STDC
21 # The folowing AC_CHECK_HEADERS was a single big line
22 AC_CHECK_HEADERS([ fcntl.h libintl.h limits.h locale.h ])
23 AC_CHECK_HEADERS([ stdlib.h string.h sys/time.h unistd.h ])
24
25 # Checks for typedefs, structures, and compiler characteristics.
26 AC_HEADER_STDBOOL
27 AC_C_INLINE
28 AC_TYPE_SIZE_T
29
30 # Checks for library functions.
31 AC_FUNC_MALLOC
32 AC_FUNC_REALLOC
33 AC_FUNC_ALLOCA
34 # The following AC_CHECK_FUNCS was a single big line
35 AC_CHECK_FUNCS([ bzero memmove memset ])
36 AC_CHECK_FUNCS([ strcasecmp strchr strcspn strdup strncasecmp strpbrk strrchr strspn strtol ])
37 AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ])
38
39 # End of the autoscan-detected stuff
40 #---------------------------------------------------------------------------
41
42 #----------------------------------------
43 # Some program checks
44 AC_PROG_RANLIB
45 AC_PROG_LEX
46 AC_PROG_YACC
47 AC_CHECK_PROGS(
48     [GPERF],
49     [gperf])
50 AS_IF(
51     [test -z "$GPERF"],
52     [AC_MSG_ERROR([can not find gperf])])
53 AC_SUBST([AM_LFLAGS], ["-L -P zconf"])
54 AC_SUBST([AM_YFLAGS], ["-t -l -p zconf"])
55
56 #----------------------------------------
57 # Check for gettext, for the kconfig frontends
58 AC_SUBST([gettext])
59 AC_CHECK_HEADERS(
60     [libintl.h],
61     [ac_ct_gettext_hdr=$ac_header; break],
62     [AC_MSG_WARN([libintl is missing, frontends will not be localised])])
63 AS_IF(
64     [test -n "$ac_ct_gettext_hdr"],
65     [AC_CHECK_DECL(
66         [gettext],[gettext=y],
67         [AC_MSG_WARN([gettext is missing, frontends will not be localised])],
68         [#include <$ac_ct_gettext_hdr>])])
69
70 #----------------------------------------
71 # Check for ncurses, for the kconfig frontends
72 AC_SUBST([CURSES_LOC])
73 AC_CHECK_HEADERS(
74     [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
75     [CURSES_LOC=$ac_header; break])
76 AS_IF(
77     [test -z "$CURSES_LOC"],
78     [AC_MSG_ERROR([could not find curses headers])])
79 AC_SEARCH_LIBS(
80     [initscr],
81     [ncursesw ncurses curses],
82     [ac_ct_curses_lib_found=yes; break])
83 AS_IF(
84     [test -z "$ac_ct_curses_lib_found"],
85     [AC_MSG_ERROR([could not find curses library])])
86
87 #----------------------------------------
88 # Prepare automake
89 AM_INIT_AUTOMAKE
90 AM_PROG_CC_C_O
91
92 #----------------------------------------
93 # Finalise
94 AC_CONFIG_FILES([
95     Makefile
96     lxdialog/Makefile
97     parser/Makefile
98     frontends/Makefile
99     frontends/conf/Makefile
100     frontends/mconf/Makefile
101     frontends/nconf/Makefile
102 ])
103 AC_OUTPUT