-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
52 lines (42 loc) · 1.35 KB
/
configure.ac
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
52
dnl Process this file with autoconf to produce a configure script.
AC_INIT([karel], [0.8])
AM_INIT_AUTOMAKE
dnl Checks for programs.
AC_PROG_CC
AC_PROG_YACC
AC_PROG_RANLIB
AC_ARG_WITH(gtk,[ --with-gtk build GTK based interface],
[case "${withval}" in
yes) with_gtk=true ;;
no) with_gtk=false ;;
*) AC_MSG_ERROR(bad value $withval for --with-gtk) ;;
esac],
[with_gtk=default])
dnl Check a --with-gtk flag to indicate no gtk is to be used.
dnl This will aid in testing, as well as being the right thing.
dnl
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
if test "$GTK_CONFIG" = "no" ; then
case "${with_gtk}" in
true) AC_MSG_ERROR(--with-gtk specified but gtk-config not found in PATH) ;;
false | default) build_gtk=false ;;
esac
else
case "${with_gtk}" in
true | default) build_gtk=true ;;
false) build_gtk=false ;;
esac
fi
AM_CONDITIONAL(WITH_GTK, test x$build_gtk = xtrue)
dnl Checks for libraries.
dnl Replace `main' with a function in -lcurses:
AC_CHECK_LIB(curses, main)
dnl Replace `main' with a function in -ltermcap:
AC_CHECK_LIB(termcap, main)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl Checks for library functions.
AC_OUTPUT(Makefile libkarel/Makefile test/Makefile curses/Makefile gtk/Makefile doc/Makefile)