# Process this file with autoconf to produce a configure script. AC_INIT AM_INIT_AUTOMAKE(powwow, 1.2.14) AC_CANONICAL_HOST AC_ARG_ENABLE(vt100, AC_HELP_STRING([--enable-vt100], [Hard code VT100 escape sequences; use if you have no termcap [[default=no]]]), , [enable_vt100="no"] ) AS_IF([ test "${enable_vt100}" = yes ], [ AC_DEFINE(USE_VT100) ]) AC_ARG_ENABLE(sort, AC_HELP_STRING([--enable-sort], [Sort aliases and actions [[default=no]]]), , [enable_sort="no"] ) AS_IF([ test "${enable_sort}" = yes ], [ AC_DEFINE(DO_SORT) ]) AC_ARG_ENABLE(noshell, AC_HELP_STRING([--enable-noshell], [Disables the "#!" command [[default=no]]]), , [enable_noshell="no"] ) AS_IF([ test "${enable_noshell}" = yes ], [ AC_DEFINE(NO_SHELL) ]) AC_ARG_ENABLE(ansibug, AC_HELP_STRING([--enable-ansibug], [Enables fixes for "#mark" ansi bugs on some terminals [[default=no]]]), , [enable_ansibug="no"] ) AS_IF([ test "${enable_ansibug}" = yes ], [ AC_DEFINE(BUG_ANSI) ]) AC_ARG_ENABLE(bsd, AC_HELP_STRING([--enable-bsd], [Needed for BSD systems, in powwow this was USE_SGTTY and BSD_LIKE. Default on Darwin (OS X) systems.])) AS_IF([ test -z "${enable_bsd}" ], [ case "${host_os}" in darwin*) enable_bsd=yes ;; *) enable_bsd=no ;; esac]) AS_IF([ test "${enable_bsd}" = yes ], [ AC_DEFINE(USE_SGTTY) AC_DEFINE(BSD_LIKE) ]) AC_MSG_CHECKING([man page encoding]) if test -z "${MAN_PAGE_ENCODING}"; then case "${host_os}" in darwin*) MAN_PAGE_ENCODING=ISO-8859-1 ;; *) MAN_PAGE_ENCODING=UTF-8 ;; esac fi AC_SUBST([MAN_PAGE_ENCODING]) AC_MSG_RESULT([${MAN_PAGE_ENCODING}]) if test "${MAN_PAGE_ENCODING}" != UTF-8; then AC_CHECK_PROG([ICONV], [iconv], [iconv], []) if test -z "${ICONV}" -a "${MAN_PAGE_ENCODING}" != UTF-8; then AC_MSG_WARN([Forcing man page encoding to UTF-8]) MAN_PAGE_ENCODING=UTF-8 fi fi AM_CONDITIONAL([MAN_PAGE_ENCODING_IS_UTF_8], [test "${MAN_PAGE_ENCODING}" = UTF-8 ]) # Checks for programs. AC_PROG_CC # Checks for libraries. AC_SEARCH_LIBS(initscr,[ncurses curses]) AC_CHECK_FUNC(regcomp,AC_DEFINE(USE_REGEXP)) AC_CHECK_FUNC(lrand48,,AC_DEFINE(USE_RANDOM)) # Dynamic modules dl_ldflags= AC_SUBST(dl_ldflags) AC_CHECK_LIB(dl,dlopen, AC_DEFINE(HAVE_LIBDL) AC_SUBST(dl_ldflags,"-rdynamic -ldl")) # Checks for header files. AC_CHECK_HEADERS([stdlib.h unistd.h]) AC_CHECK_HEADER([locale.h], [AC_CHECK_FUNC([putwc],[AC_DEFINE(USE_LOCALE)])]) AC_ARG_WITH([plugindir], AC_HELP_STRING([--with-plugindir=DIR], [Plugin installation directory [[default=LIBDIR/powwow]]])], [plugindir="${withval}"], [plugindir="\${libdir}/powwow"]) AC_SUBST(plugindir) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([bzero]) AC_OUTPUT(Makefile) AC_OUTPUT cat <