# # Process this file with autoconf to produce a configure script. # # autoconf claims that this should be package name; # but it seems that the name of a randomly choosen but # existing file is required. AC_INIT(perl/main.pl) YAIRD_VERSION=0.0.5 AM_INIT_AUTOMAKE(yaird,${YAIRD_VERSION}) # # Required optional feature to determine which template to install. # Packagers are expected to put their own template in ./templates # before configuring, so this should not get in their way. # This should go away once we have option file parsing. # AC_ARG_ENABLE(template, AC_HELP_STRING([--enable-template=name],[install templates/name.pm as initrd template (no default)]), [ if test -f "templates/$enableval.pm" then INITRD_TEMPLATE="$enableval" AC_SUBST(INITRD_TEMPLATE) else AC_MSG_ERROR(Template '$enableval' not found in ./templates) fi ], [ AC_MSG_ERROR(required option --enable-template=xxx is missing) ]) AC_ARG_ENABLE(nuke, AC_HELP_STRING([--enable-nuke], [Nuke initramfs before moving to real root]), [ case "${enableval}" in yes) enable_nuke=true ;; no) enable_nuke=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-nuke) ;; esac ],[ enable_nuke=false ]) if test "$enable_nuke" = true; then AC_DEFINE(ENABLE_NUKE,1, [Define to nuke initramfs before moving to real root]) fi # Checks for programs. AC_PATH_PROG(PERL,perl) AC_PROG_CC # # XML formatting; unclear what processor is most widely available. # AC_PATH_PROG(XMLTO,xmlto,:) # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. # Use this when we need to compile C programs. AM_CONFIG_HEADER(include/config.h) AC_CONFIG_FILES([ Makefile templates/Makefile perl/Makefile doc/Makefile exec/Makefile doc/yaird.xml ]) AC_OUTPUT()