1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(id3ed.cc)
3dnl automake is ridiculously overboard for a prog this small
4dnl AM_INIT_AUTOMAKE(id3ed, 1.6)
5AC_CONFIG_HEADER(config.h)
6
7AC_LANG_CPLUSPLUS
8
9dnl Checks for programs.
10AC_PROG_CXX
11AC_PROG_INSTALL
12
13dnl Checks for libraries.
14have_term_stuff=no
15AC_CHECK_LIB(curses, tputs)
16if test "$ac_cv_lib_curses_tputs" = "yes"; then
17 	have_term_stuff=yes
18fi
19if test "$have_term_stuff" != "yes"; then
20	AC_CHECK_LIB(termcap, tputs)
21	if test "$ac_cv_lib_termcap_tputs" = "yes"; then
22		have_term_stuff=yes
23	fi
24fi
25
26if test "$have_term_stuff" = "yes"; then
27	AC_CHECK_LIB(readline, readline)
28	AC_CHECK_LIB(history, add_history)
29fi
30
31
32dnl Checks for header files.
33AC_HEADER_STDC
34AC_CHECK_HEADERS(fcntl.h unistd.h set.h getopt.h)
35
36
37dnl Checks for typedefs, structures, and compiler characteristics.
38AC_TYPE_OFF_T
39
40dnl Checks for library functions.
41AC_CHECK_FUNCS(strerror strtol snprintf)
42
43AC_OUTPUT(Makefile)
44
45if test "$ac_cv_lib_readline_readline" != "yes"; then
46	echo ""
47	echo "Notice: not using readline.  Make sure you have readline dev libs/headers available"
48fi
49