1
# Process this file with autoconf to produce a configure script.
5
m4_define([MENUSELECT_VERSION],
6
m4_bpatsubst(m4_esyscmd([./make_version .]),
7
[\([0-9.]*\)\(\w\|\W\)*],
9
AC_INIT(menuselect, MENUSELECT_VERSION, www.asterisk.org)
11
# check existence of the package
12
AC_CONFIG_SRCDIR([menuselect.c])
14
# specify output header file
15
AC_CONFIG_HEADER(autoconfig.h)
17
AC_COPYRIGHT("Menuselect")
18
AC_REVISION($Revision: 40837 $)
27
#ifndef MENUSELECT_AUTOCONFIG_H
28
#define MENUSELECT_AUTOCONFIG_H
39
# Checks for programs.
45
AC_ARG_ENABLE([debug],
46
[AS_HELP_STRING([--enable-debug], [Turn on debug mode])],
47
[case "${enableval}" in
48
y|ye|yes) MENUSELECT_DEBUG=yes ;;
49
n|no) MENUSELECT_DEBUG=no ;;
50
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
52
AC_SUBST(MENUSELECT_DEBUG)
54
AST_GCC_ATTRIBUTE(weak_import)
55
AST_GCC_ATTRIBUTE(weakref)
58
AC_CHECK_FUNCS([asprintf getloadavg setenv strcasestr strndup strnlen strsep unsetenv vasprintf])
60
# The frontend can use curses, ncurses, newt or GTK2 so check for all of them
62
AST_EXT_LIB_SETUP([NEWT], [newt], [newt])
63
AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
64
AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
66
AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
67
AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
68
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
71
AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
72
if test ! "x${PKGCONFIG}" = xNo; then
73
GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags 2>/dev/null)
74
GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
76
AC_DEFINE([HAVE_GTK2], 1, [Define if your system has the GTK2 libraries.])
79
AC_SUBST(GTK2_INCLUDE)
82
test "$silent"=yes && ac_sub_configure_args="${ac_sub_configure_args} --silent"
84
AC_CONFIG_FILES([makeopts])
85
AC_CONFIG_SUBDIRS([mxml])
88
AC_MSG_NOTICE(Menuselect build configuration successfully completed)