summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: d831e776b0437ad57191f1a2b062859d7620ebed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(memedit, 0.6, bugs@pengutronix.de)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([memedit.c])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_LIBTOOL
AC_PROG_LEX
if test "$LEX" != flex; then
  LEX="$SHELL $missing_dir/missing flex"
  AC_SUBST(LEX_OUTPUT_ROOT, lex.yy)
  AC_SUBST(LEXLIB, '')
fi
AC_PROG_YACC

# Checks for libraries.

#
# define helper function
#
AC_DEFUN([AC_CHECK_LIBRARY],
    [ac_save_LIBS="$LIBS"
    LIBS="$$3 $ac_save_LIBS"
    AC_CHECK_LIB($1,$2)
    $3=`echo "$LIBS" | sed "s% $ac_save_LIBS$%%"`
    LIBS="$ac_save_LIBS"])


# Checks for libraries.
# FIXME: Replace `main' with a function in `-lncurses':
LIBS="$LIBS -lncurses"
AC_CHECK_LIBRARY(readline, main, READLINE_LIBS)
if test x"${READLINE_LIBS}" = x""; then
	AC_MSG_ERROR([You need the readline library])
fi
READLINE_LIBS="$READLINE_LIBS -lncurses"
AC_SUBST(READLINE_LIBS)

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
AC_OUTPUT(Makefile)