# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # $Id: configure.ac 16 2008-01-09 10:28:32Z ace $ AC_PREREQ(2.61) AC_INIT(fortune-my, 0.1, ace@momiage.org) # Checks for programs. AC_PATH_PROGS(NKF,nkf) AC_PATH_PROGS(STRFILE,strfile) AC_PATH_PROGS(SUDO,sudo) AC_ARG_WITH(encode, AS_HELP_STRING( [--with-encode=type], [euc,utf8 (default utf8)]), if test x${withval} == 'xutf8' ; then ENCODE="--utf8" elif test x$withval == xeuc; then ENCODE="--euc" else AC_MSG_ERROR(strange encode type) fi ) if test x$ENCODE == x; then ENCODE='--utf8' fi AC_ARG_WITH(fortunes-dir, AS_HELP_STRING( [--with-fortunes-dir=PATH], [fortunes data dir.]), [DATADIR=$withval]) if test x$DATADIR == x; then if test -d /usr/share/games/fortunes; then DATADIR=/usr/share/games/fortunes/my elif test -d /usr/share/games/fortune; then DATADIR=/usr/share/games/fortune/my else AC_MSG_ERROR([fortunes data directory can't find. Please use --with-fortunes-dir=dir.]) fi fi #if test x$fortunes_dir == x; then # AC_PATH_TOOL(DATADIR, fortunes,,[/usr/share/games/fortunes,/usr/share/games/fortune]) # if test "x$DATADIR" == x; then # AC_MSG_ERROR([fortunes data directory cannot found. # Please use --with-fortunes-dir=dir.]) # fi #fi # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_SUBST(nkf) AC_SUBST(strfile) AC_SUBST(sudo) AC_SUBST(DATADIR) AC_CONFIG_FILES(Makefile) AC_SUBST(ENCODE) AC_CONFIG_FILES(txt2.sh) AC_OUTPUT