dnl Process this file with autoconf to produce a configure script.

AC_INIT(nmapfe.c)

#AM_INIT_AUTOMAKE(nmapfe, 0.9.5)

AC_PROG_CC

#AM_PATH_GTK(1.0.0,
#            [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"],
#            AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
AM_PATH_GTK(1.0.0,
            [LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS"],
            AC_DEFINE(MISSING_GTK) \
	    AC_MSG_WARN(NMAPFE WILL NOT BE BUILT -- BUT NMAP SHOULD STILL WORK ))

dnl Only use -Wall if we have gcc
if test "x$GCC" = "xyes"; then
  if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
    CFLAGS="$CFLAGS -Wall"
  fi
fi

AC_ARG_WITH(libnbase,
[  --with-libnbase=DIR     Look for nbase include/libs in DIR],
[  case "$with_libnbase" in
  yes)
    ;;
  *)
    NBASEDIR="$with_libnbase"
    ;;
  esac],
NBASEDIR="../nbase"
)
LDFLAGS="$LDFLAGS -L$NBASEDIR"
CFLAGS="$CFLAGS -I$NBASEDIR"
LIBS="$LIBS -lnbase"
AC_SUBST(NBASEDIR)

AC_OUTPUT(Makefile)
