2015-02-25 04:47:25 +08:00
|
|
|
#
|
2013-12-25 22:25:36 +08:00
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
#
|
|
|
|
|
|
|
|
AC_PREREQ([2.69])
|
|
|
|
|
2015-02-27 06:38:44 +08:00
|
|
|
AC_INIT(hh, 1.16, martin.dvorak@mindforger.com)
|
2014-09-13 03:59:42 +08:00
|
|
|
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
|
2013-12-25 22:25:36 +08:00
|
|
|
|
|
|
|
# Checks for src dir existence.
|
|
|
|
AC_CONFIG_SRCDIR([src/hstr.c])
|
|
|
|
|
2015-01-08 19:07:06 +08:00
|
|
|
# Init (no longer takes parameters).
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
2013-12-25 22:25:36 +08:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
|
2015-02-27 15:41:44 +08:00
|
|
|
# Platform specific ncurses check.
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AS_CASE([$host_os],
|
|
|
|
[darwin*],
|
|
|
|
[
|
|
|
|
AC_CHECK_LIB(ncurses, killwchar, [], [AC_MSG_ERROR([Could not find ncurses library])])
|
|
|
|
AC_CHECK_HEADER(curses.h)
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AC_CHECK_LIB(ncursesw, killwchar, [], [AC_MSG_ERROR([Could not find ncursesw library])])
|
|
|
|
AC_CHECK_HEADER(ncursesw/curses.h)
|
|
|
|
]
|
|
|
|
)
|
2015-02-24 23:02:25 +08:00
|
|
|
|
2013-12-25 22:25:36 +08:00
|
|
|
# Checks for libraries.
|
2014-09-13 03:46:49 +08:00
|
|
|
AC_CHECK_LIB(m, cos, [], [AC_MSG_ERROR([Could not find m library])])
|
|
|
|
AC_CHECK_LIB(readline, using_history, [], [AC_MSG_ERROR([Could not find readline library])])
|
2013-12-25 22:25:36 +08:00
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADER(assert.h)
|
2014-01-25 20:38:20 +08:00
|
|
|
AC_CHECK_HEADER(ctype.h)
|
2013-12-25 22:25:36 +08:00
|
|
|
AC_CHECK_HEADER(fcntl.h)
|
2014-09-13 03:59:42 +08:00
|
|
|
AC_CHECK_HEADER(getopt.h)
|
|
|
|
AC_CHECK_HEADER(locale.h)
|
2013-12-25 22:25:36 +08:00
|
|
|
AC_CHECK_HEADER(math.h)
|
|
|
|
AC_CHECK_HEADER(readline/history.h)
|
2014-09-13 03:59:42 +08:00
|
|
|
AC_CHECK_HEADER(regex.h)
|
|
|
|
AC_CHECK_HEADER(signal.h)
|
2013-12-25 22:25:36 +08:00
|
|
|
AC_CHECK_HEADER(stdbool.h)
|
|
|
|
AC_CHECK_HEADER(stddef.h)
|
|
|
|
AC_CHECK_HEADER(stdio.h)
|
|
|
|
AC_CHECK_HEADER(stdlib.h)
|
|
|
|
AC_CHECK_HEADER(string.h)
|
|
|
|
AC_CHECK_HEADER(sys/ioctl.h)
|
|
|
|
AC_CHECK_HEADER(termios.h)
|
|
|
|
AC_CHECK_HEADER(unistd.h)
|
2014-09-13 03:59:42 +08:00
|
|
|
AC_CHECK_HEADER(wchar.h)
|
2013-12-25 22:25:36 +08:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_CHECK_HEADER_STDBOOL
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_CHECK_FUNCS([memset strdup strstr])
|
|
|
|
|
|
|
|
AC_OUTPUT
|