X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=configure.ac.in;h=8372b98860ed705c21b34c3786eddc41ff26c738;hp=501528ff70758e758b542e9f4279bc8fd7d23856;hb=38d7d1a97d46aacf67675038c927e579bb589310;hpb=bf40f5fbd759241d1505c985fa02441cd6febd64 diff --git a/configure.ac.in b/configure.ac.in index 501528f..8372b98 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -28,6 +28,26 @@ AC_PROG_INSTALL AM_INIT_AUTOMAKE LT_INIT +AX_WITH_CURSES +AX_WITH_CURSES_MENU +AX_WITH_CURSES_FORM + +AM_CONDITIONAL([WITH_NCURSES], [test "x$ax_cv_curses" = "xyes"]) + +if test "x$ax_cv_curses" = xyes; then + if test "x$ax_cv_menu" != xyes; then + AC_MSG_ERROR([--with-ncurses requires the ncurses menu library]) + fi + if test "x$ax_cv_form" != xyes; then + AC_MSG_ERROR([--with-ncurses requires the ncurses form library]) + fi +fi + +AC_CHECK_LIB([udev], [udev_new], + [], + [AC_MSG_FAILURE([The libudev development library is required by petitboot. Try installing the package libudev-dev or libudev-devel.])] +) + AC_CHECK_HEADERS([stdarg.h]) AC_CHECK_HEADERS([varargs.h]) @@ -52,16 +72,6 @@ else fi fi -AC_ARG_WITH( - [ncurses], - [AS_HELP_STRING([--with-ncurses], - [build text console UI programs using ncurses [default=yes]] - )], - [], - [with_ncurses=yes] -) -AM_CONDITIONAL([WITH_NCURSES], [test "x$with_ncurses" = "xyes"]) - AC_ARG_WITH( [twin-x11], [AS_HELP_STRING([--with-twin-x11], @@ -97,7 +107,7 @@ AS_IF( [twin], [twin_feature_init], [], - [AC_MSG_FAILURE([--with-twin was given, but test for twin failed])] + [AC_MSG_FAILURE([--with-twin was given but the test for libtwin failed.])] ) LIBS="$SAVE_LIBS" ], @@ -180,13 +190,14 @@ DEFINE_HOST_PROG(MOUNT, mount, [/bin/mount]) DEFINE_HOST_PROG(SHUTDOWN, shutdown, [/sbin/shutdown]) DEFINE_HOST_PROG(SFTP, sftp, [/usr/bin/sftp]) DEFINE_HOST_PROG(TFTP, tftp, [/usr/bin/tftp]) -DEFINE_HOST_PROG(UDEVADM, udevadm, [/sbin/udevadm]) DEFINE_HOST_PROG(UMOUNT, umount, [/bin/umount]) DEFINE_HOST_PROG(WGET, wget, [/usr/bin/wget]) +DEFINE_HOST_PROG(IP, ip, [/sbin/ip]) +DEFINE_HOST_PROG(UDHCPC, udhcpc, [/sbin/udhcpc]) default_cflags="--std=gnu99 -g \ -Wall -W -Wunused -Wstrict-prototypes -Wmissing-prototypes \ - -Wmissing-declarations -Wredundant-decls -Winline" + -Wmissing-declarations -Wredundant-decls" AC_ARG_ENABLE( [werror], @@ -205,6 +216,7 @@ AS_IF( AC_SUBST([LIBTOOL_DEPS]) AC_SUBST([DESTDIR]) +AC_SUBST([pkgsysconfdir], ["${sysconfdir}/${package}"]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ @@ -213,6 +225,7 @@ AC_CONFIG_FILES([ lib/Makefile man/Makefile test/Makefile + test/lib/Makefile test/parser/Makefile test/urls/Makefile ui/Makefile