From b17c82a0b0a75c7329679e9a42f1609c8e5ff1ac Mon Sep 17 00:00:00 2001 From: david Date: Thu, 1 Nov 2007 07:45:43 +0000 Subject: [PATCH] Remove NmapFE. --- CHANGELOG | 2 + HACKING | 11 +- Makefile.in | 32 +- configure | 342 +--- configure.ac | 28 +- docs/nmapfe.1 | 81 - docs/xnmap.1 | 1 - nmap.spec.in | 41 +- nmapfe.desktop | 12 - nmapfe/Makefile.in | 296 ---- nmapfe/NmapFE.dsp | 162 -- nmapfe/aclocal.m4 | 210 --- nmapfe/config.guess | 1476 ----------------- nmapfe/config.sub | 1605 ------------------ nmapfe/configure | 3688 ----------------------------------------- nmapfe/configure.ac | 123 -- nmapfe/nmapfe.c | 1605 ------------------ nmapfe/nmapfe.dsw | 29 - nmapfe/nmapfe.h | 310 ---- nmapfe/nmapfe_error.c | 150 -- nmapfe/nmapfe_error.h | 127 -- nmapfe/nmapfe_sig.c | 1313 --------------- nmapfe/nmapfe_sig.h | 153 -- 23 files changed, 25 insertions(+), 11772 deletions(-) delete mode 100644 docs/nmapfe.1 delete mode 100644 docs/xnmap.1 delete mode 100644 nmapfe.desktop delete mode 100644 nmapfe/Makefile.in delete mode 100644 nmapfe/NmapFE.dsp delete mode 100644 nmapfe/aclocal.m4 delete mode 100755 nmapfe/config.guess delete mode 100755 nmapfe/config.sub delete mode 100755 nmapfe/configure delete mode 100644 nmapfe/configure.ac delete mode 100644 nmapfe/nmapfe.c delete mode 100644 nmapfe/nmapfe.dsw delete mode 100644 nmapfe/nmapfe.h delete mode 100644 nmapfe/nmapfe_error.c delete mode 100644 nmapfe/nmapfe_error.h delete mode 100644 nmapfe/nmapfe_sig.c delete mode 100644 nmapfe/nmapfe_sig.h diff --git a/CHANGELOG b/CHANGELOG index 72fe6b3c3..241abb566 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ # Nmap Changelog ($Id$); -*-text-*- +o Removed the NmapFE frontend. + 4.22SOC8 o Removed the old massping() system, since the functionality has now diff --git a/HACKING b/HACKING index 7ff61ce60..a13059642 100644 --- a/HACKING +++ b/HACKING @@ -48,12 +48,11 @@ Of course, you are welcome to work on whatever suits your fancy. But here are some ideas of contributions that might be particularly useful: -o Nmap GUI improvements -- I am currently maintaining NmapFE (also known - as xnmap) -- the GTK GUI front end to Nmap. I am very open to changes - and improvements in that program. If you have enhancement ideas, give - it a shot! Alternatively, consider contributing to the NmapGUI and - UMIT projects available at http://sourceforge.net/projects/nmapgui/ - and http://umit.sourceforge.net/ , respectively. +o Nmap GUI improvements -- Zenmap is the Nmap GUI. If you have + enhancement ideas, give it a shot! Alternatively, consider + contributing to the NmapGUI and Umit projects available at + http://sourceforge.net/projects/nmapgui/ and + http://umit.sourceforge.net/ , respectively. One of the best ways to help is to join the nmap-dev list ( http://cgi.insecure.org/mailman/listinfo/nmap-dev ). Requests for diff --git a/Makefile.in b/Makefile.in index 7af581914..435021b0a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -53,8 +53,6 @@ export RPMTDIR=$(HOME)/rpm DESTDIR = TARGET = nmap -TARGETNMAPFE=@TARGETNMAPFE@ -INSTALLNMAPFE=@INSTALLNMAPFE@ INSTALLNSE=@INSTALLNSE@ BUILDZENMAP=@BUILDZENMAP@ INSTALLZENMAP=@INSTALLZENMAP@ @@ -77,7 +75,7 @@ OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ all: @LUA_DEPENDS@ @PCAP_DEPENDS@ @PCRE_DEPENDS@ @DNET_DEPENDS@ $(NBASEDIR)/libnbase.a $(NSOCKDIR)/src/libnsock.a $(NSESTDLIB) - $(MAKE) $(TARGET) $(TARGETNMAPFE) $(BUILDZENMAP) + $(MAKE) $(TARGET) $(BUILDZENMAP) $(TARGET): $(OBJS) echo Compiling nmap @@ -116,14 +114,6 @@ $(LIBLUADIR)/liblua.a: $(LIBLUADIR)/Makefile FORCE # @echo Configuring libpcap; cd $(LIBPCAPDIR); ./configure -nmapfe/nmapfe: -# @echo "FAILURES HERE ARE OK -- THEY JUST MEAN YOU CANNOT USE nmapfe" -# -rm -f nmapfe/Makefile -# -cd nmapfe; ./configure; - @if test -f nmapfe/Makefile; then echo "Building NmapFE graphical frontend"; cd nmapfe && $(MAKE) VERSION=$(NMAP_VERSION); else echo "NmapFE will not be made -- your system lacks the capabilities (perhaps GTK) for this graphical frontend. You can still run command-line nmap!"; fi -# -cd nmapfe; test -f Makefile && $(MAKE) VERSION=$(NMAP_VERSION) STATIC=$(STATIC); -# @echo "END OF SECTION WHERE FAILURES ARE OK" - # Make a statically compiled binary for portability between distributions static: $(MAKE) STATIC=-static @@ -139,7 +129,7 @@ distro: web: cd $(NMAPDEVDIR) && $(MAKE) web -clean: @LUA_CLEAN@ @PCAP_CLEAN@ @PCRE_CLEAN@ @DNET_CLEAN@ nmapfe_clean nsock_clean nbase_clean my_clean @NSELIB_CLEAN@ @ZENMAP_CLEAN@ +clean: @LUA_CLEAN@ @PCAP_CLEAN@ @PCRE_CLEAN@ @DNET_CLEAN@ nsock_clean nbase_clean my_clean @NSELIB_CLEAN@ @ZENMAP_CLEAN@ my_clean: rm -f dependencies.mk @@ -150,8 +140,6 @@ pcre_clean: -cd $(LIBPCREDIR) && $(MAKE) clean dnet_clean: -cd $(LIBDNETDIR) && $(MAKE) clean -nmapfe_clean: - -cd nmapfe && $(MAKE) clean nbase_clean: -cd $(NBASEDIR) && $(MAKE) clean nsock_clean: @@ -168,8 +156,6 @@ pcre_dist_clean: -cd $(LIBPCREDIR) && $(MAKE) distclean dnet_dist_clean: -cd $(LIBDNETDIR) && $(MAKE) distclean -nmapfe_dist_clean: - -cd nmapfe && $(MAKE) distclean lua_dist_clean: -cd $(LIBLUADIR) && $(MAKE) clean nselib_dist_clean: @@ -183,7 +169,7 @@ zenmap_dist_clean: zenmap_clean debugclean: rm -f *.gcov *.gcda *.gcno gmon.out -distclean: my_clean my_distclean @LUA_DIST_CLEAN@ @PCAP_DIST_CLEAN@ @PCRE_DIST_CLEAN@ @DNET_DIST_CLEAN@ nmapfe_dist_clean @NSELIB_DIST_CLEAN@ @ZENMAP_DIST_CLEAN@ +distclean: my_clean my_distclean @LUA_DIST_CLEAN@ @PCAP_DIST_CLEAN@ @PCRE_DIST_CLEAN@ @DNET_DIST_CLEAN@ @NSELIB_DIST_CLEAN@ @ZENMAP_DIST_CLEAN@ my_distclean: rm -f Makefile Makefile.bak makefile.dep config.h stamp-h stamp-h.in \ @@ -203,11 +189,6 @@ install-nmap: $(TARGET) $(INSTALL) -c -m 644 nmap-protocols $(DESTDIR)$(nmapdatadir)/ $(INSTALL) -c -m 644 nmap-mac-prefixes $(DESTDIR)$(nmapdatadir)/ -install-nmapfe: $(TARGETNMAPFE) - $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(nmapdatadir) $(DESTDIR)$(deskdir) - @echo "If the next command fails -- you cannot use the X front end" - -test -f nmapfe/nmapfe && $(INSTALL) -c -m 755 -s nmapfe/nmapfe $(DESTDIR)$(bindir)/nmapfe && rm -f $(DESTDIR)$(bindir)/xnmap && $(SHTOOL) mkln -f -s $(DESTDIR)$(bindir)/nmapfe $(DESTDIR)$(bindir)/xnmap && $(INSTALL) -c -m 644 nmapfe.desktop $(DESTDIR)$(deskdir)/nmapfe.desktop && $(INSTALL) -c -m 644 docs/nmapfe.1 $(DESTDIR)$(mandir)/man1/nmapfe.1 && $(INSTALL) -c -m 644 docs/xnmap.1 $(DESTDIR)$(mandir)/man1/xnmap.1 - $(ZENMAPDIR)/setup.py: cd $(ZENMAPDIR) && install_scripts/unix/setup.sh @@ -233,13 +214,12 @@ install-nse: $(TARGET) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(nmaplibexecdir)/nse cp -f $(NSE_LIB_SO_FILES) $(DESTDIR)$(nmaplibexecdir)/nse -install: install-nmap $(INSTALLNMAPFE) $(INSTALLNSE) $(INSTALLZENMAP) +install: install-nmap $(INSTALLNSE) $(INSTALLZENMAP) @echo "NMAP SUCCESSFULLY INSTALLED" uninstall: - rm -f $(bindir)/$(TARGET) $(bindir)/nmapfe $(bindir)/xnmap - rm -f $(deskdir)/nmapfe.desktop $(mandir)/man1/nmapfe.1 - rm -f $(mandir)/man1/xnmap.1 $(mandir)/man1/nmap.1 + rm -f $(bindir)/$(TARGET) $(bindir)/xnmap + rm -f $(mandir)/man1/nmap.1 rm -rf $(nmapdatadir) $(nmaplibexecdir) ${srcdir}/configure: configure.ac diff --git a/configure b/configure index 3aac9f318..ab9410cee 100755 --- a/configure +++ b/configure @@ -313,7 +313,7 @@ ac_subdirs_all="$ac_subdirs_all libpcre" ac_subdirs_all="$ac_subdirs_all libdnet-stripped" ac_subdirs_all="$ac_subdirs_all nselib" ac_subdirs_all="$ac_subdirs_all $nmap_cfg_subdirs" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libpcapdir pcredir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CXXPROG COMPAT_OBJS COMPAT_SRCS build build_cpu build_vendor build_os host host_cpu host_vendor host_os LUAFLAGS CPP EGREP TARGETNMAPFE INSTALLNMAPFE BUILDZENMAP INSTALLZENMAP ZENMAP_CLEAN ZENMAP_DIST_CLEAN OPENSSL_LIBS PCAP_DEPENDS PCAP_CLEAN PCAP_DIST_CLEAN LIBPCAP_LIBS subdirs LIBPCRE_LIBS LIBPCREDIR PCRE_DEPENDS PCRE_CLEAN PCRE_DIST_CLEAN LIBDNET_LIBS LIBDNETDIR DNET_DEPENDS DNET_CLEAN DNET_DIST_CLEAN LIBLUA_LIBS LIBLUADIR LUA_DEPENDS LUA_CLEAN LUA_DIST_CLEAN INSTALLNSE NSELIB_CLEAN NSELIB_DIST_CLEAN NBASEDIR LIBNBASE_LIBS NSOCKDIR LIBNSOCK_LIBS PKG_CONFIG GTK_CFLAGS GTK_LIBS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libpcapdir pcredir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CXXPROG COMPAT_OBJS COMPAT_SRCS build build_cpu build_vendor build_os host host_cpu host_vendor host_os LUAFLAGS CPP EGREP BUILDZENMAP INSTALLZENMAP ZENMAP_CLEAN ZENMAP_DIST_CLEAN OPENSSL_LIBS PCAP_DEPENDS PCAP_CLEAN PCAP_DIST_CLEAN LIBPCAP_LIBS subdirs LIBPCRE_LIBS LIBPCREDIR PCRE_DEPENDS PCRE_CLEAN PCRE_DIST_CLEAN LIBDNET_LIBS LIBDNETDIR DNET_DEPENDS DNET_CLEAN DNET_DIST_CLEAN LIBLUA_LIBS LIBLUADIR LUA_DEPENDS LUA_CLEAN LUA_DIST_CLEAN INSTALLNSE NSELIB_CLEAN NSELIB_DIST_CLEAN NBASEDIR LIBNBASE_LIBS NSOCKDIR LIBNSOCK_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -853,17 +853,11 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-gtktest do not try to compile and run a test GTK+ program - Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-localdirs Explicitly ask compiler to use /usr/local/{include,libs} if they exist - --without-nmapfe Skip nmapfe X-window GUI --without-zenmap Skip installation of the Zenmap graphical frontend --with-openssl=DIR Use optional openssl libs and includes from DIR/lib/ and DIR/include/openssl/) @@ -4018,25 +4012,6 @@ if test "$ac_cv_search_setsockopt" != no; then fi -# By default, try to build nmapfe if possible -test "${with_nmapfe+set}" != "set" && with_nmapfe=yes - -TARGETNMAPFE=nmapfe/nmapfe -INSTALLNMAPFE=install-nmapfe - -# Check whether --with-nmapfe or --without-nmapfe was given. -if test "${with_nmapfe+set}" = set; then - withval="$with_nmapfe" - case "$with_nmapfe" in - no) - TARGETNMAPFE=""; INSTALLNMAPFE="" - ;; - esac - -fi; - - - # Do they want Zenmap? BUILDZENMAP=build-zenmap INSTALLZENMAP=install-zenmap @@ -7034,316 +7009,6 @@ else fi -if test "${with_nmapfe}" = "yes"; then -# Check whether --enable-gtktest or --disable-gtktest was given. -if test "${enable_gtktest+set}" = set; then - enableval="$enable_gtktest" - -else - enable_gtktest=yes -fi; - - pkg_config_args=gtk+-2.0 - for module in . - do - case "$module" in - gthread) - pkg_config_args="$pkg_config_args gthread-2.0" - ;; - esac - done - - no_gtk="" - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - if test x$PKG_CONFIG != xno ; then - if pkg-config --atleast-pkgconfig-version 0.7 ; then - : - else - echo "*** pkg-config too old; version 0.7 or better required." - no_gtk=yes - PKG_CONFIG=no - fi - else - no_gtk=yes - fi - - min_gtk_version=2.4.0 - echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 -echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6 - - if test x$PKG_CONFIG != xno ; then - ## don't try to run the test against uninstalled libtool libs - if $PKG_CONFIG --uninstalled $pkg_config_args; then - echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" - enable_gtktest=no - fi - - if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then - : - else - no_gtk=yes - fi - fi - - if test x"$no_gtk" = x ; then - GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` - GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` - gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_gtktest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" - rm -f conf.gtktest - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtktest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtk_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - if ((gtk_major_version != $gtk_config_major_version) || - (gtk_minor_version != $gtk_config_minor_version) || - (gtk_micro_version != $gtk_config_micro_version)) - { - printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If pkg-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); - printf("*** to point to the correct configuration files\n"); - } - else if ((gtk_major_version != GTK_MAJOR_VERSION) || - (gtk_minor_version != GTK_MINOR_VERSION) || - (gtk_micro_version != GTK_MICRO_VERSION)) - { - printf("*** GTK+ header files (version %d.%d.%d) do not match\n", - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - } - else - { - if ((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); - printf("*** correct copy of pkg-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -no_gtk=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtk" = x ; then - echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 -echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6 - -ac_subdirs_all="$ac_subdirs_all nmapfe" - -subdirs="$subdirs nmapfe" - - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - if test "$PKG_CONFIG" = "no" ; then - echo "*** A new enough version of pkg-config was not found." - echo "*** See http://pkgconfig.sourceforge.net" - else - if test -f conf.gtktest ; then - : - else - echo "*** Could not run GTK+ test program, checking why..." - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -int -main () -{ - return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK+ or finding the wrong" - echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - { echo "$as_me:$LINENO: WARNING: Gtk+ has not been installed -> nmapfe will not be made" >&5 -echo "$as_me: WARNING: Gtk+ has not been installed -> nmapfe will not be made" >&2;} - fi - - - rm -f conf.gtktest - -fi @@ -7986,8 +7651,6 @@ s,@host_os@,$host_os,;t t s,@LUAFLAGS@,$LUAFLAGS,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t -s,@TARGETNMAPFE@,$TARGETNMAPFE,;t t -s,@INSTALLNMAPFE@,$INSTALLNMAPFE,;t t s,@BUILDZENMAP@,$BUILDZENMAP,;t t s,@INSTALLZENMAP@,$INSTALLZENMAP,;t t s,@ZENMAP_CLEAN@,$ZENMAP_CLEAN,;t t @@ -8020,9 +7683,6 @@ s,@NBASEDIR@,$NBASEDIR,;t t s,@LIBNBASE_LIBS@,$LIBNBASE_LIBS,;t t s,@NSOCKDIR@,$NSOCKDIR,;t t s,@LIBNSOCK_LIBS@,$LIBNSOCK_LIBS,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t -s,@GTK_LIBS@,$GTK_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.ac b/configure.ac index 97f63721e..955f9469d 100644 --- a/configure.ac +++ b/configure.ac @@ -171,21 +171,6 @@ AC_CHECK_HEADERS(pwd.h termios.h) dnl If any socket libraries needed AC_SEARCH_LIBS(setsockopt, socket) -# By default, try to build nmapfe if possible -test "${with_nmapfe+set}" != "set" && with_nmapfe=yes - -TARGETNMAPFE=nmapfe/nmapfe -INSTALLNMAPFE=install-nmapfe -AC_ARG_WITH(nmapfe, AC_HELP_STRING([--without-nmapfe], [Skip nmapfe X-window GUI]), - [ case "$with_nmapfe" in - no) - TARGETNMAPFE=""; INSTALLNMAPFE="" - ;; - esac] -) -AC_SUBST(TARGETNMAPFE) -AC_SUBST(INSTALLNMAPFE) - # Do they want Zenmap? BUILDZENMAP=build-zenmap INSTALLZENMAP=install-zenmap @@ -675,7 +660,7 @@ AC_SUBST(LIBNSOCK_LIBS) nmap_cfg_subdirs="$nmap_cfg_subdirs $NSOCKDIR/src" -dnl I need to configure nmapfe and libpcap here since the user might +dnl I need to configure nsock and libpcap here since the user might dnl have specified special options (such as --prefix ) dnl dnl But I only have to configure libpcap if I am going to use it @@ -687,12 +672,13 @@ else fi -if test "${with_nmapfe}" = "yes"; then +dnl Commented out -- awaiting transition to Zenmap. +dnl if test "${with_nmapfe}" = "yes"; then dnl Check for GTK+ -AM_PATH_GTK_2_0(2.4.0, - AC_CONFIG_SUBDIRS(nmapfe), - AC_MSG_WARN([Gtk+ has not been installed -> nmapfe will not be made])) -fi +dnl AM_PATH_GTK_2_0(2.4.0, +dnl AC_CONFIG_SUBDIRS(nmapfe), +dnl AC_MSG_WARN([Gtk+ has not been installed -> nmapfe will not be made])) +dnl fi dnl all hell broke loose when the variable was named $subdirs AC_CONFIG_SUBDIRS( $nmap_cfg_subdirs ) diff --git a/docs/nmapfe.1 b/docs/nmapfe.1 deleted file mode 100644 index 38cd13499..000000000 --- a/docs/nmapfe.1 +++ /dev/null @@ -1,81 +0,0 @@ -.\" This definition swiped from the gcc(1) man page -.de Sp -.if n .sp -.if t .sp 0.4 -.. -.TH NMAPFE 1 -.SH NAME -nmapfe (xnmap) \- GTK+ graphical frontend to the Nmap Security Scanner -.SH SYNOPSIS -.B nmapfe -[ any Glib options such as --display ] -.SH DESCRIPTION - -.I Nmapfe -(also known as xnmap) is a convenient X Window front end for the Nmap -Security Scanner. Most of the options correspond directly to Nmap -options, which are described in detail in the Nmap man page. We -recommend you read that first. There is also limited help available -via the NmapFE "Help" menu. -.SH AUTHOR -.Sp -NmapFE was originally written by Zach Smith -.I -.Sp -It is now maintained by Fyodor -.I -.Sp -Feel free to write me ( fyodor@insecure.org ) with -questions or bug reports. -.SH DISTRIBUTION -The newest version of -.I nmapfe -can be obtained from -.I http://www.insecure.org/nmap/ -.Sp -.I nmapfe -is (C) 1999, 2000 by Fyodor (fyodor@insecure.org) -.Sp -This program is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public -License as published by the Free Software Foundation; -Version 2. This guarantees your right to use, modify, and -redistribute Nmap under certain conditions. If this license -is unacceptable to you, Insecure.Org may be willing to sell -alternative licenses (contact fyodor@insecure.org ). -.Sp -Source is provided to this software because we believe users -have a right to know exactly what a program is going to do -before they run it. This also allows you to audit the -software for security holes (none have been found so far). -.Sp -Source code also allows you to port nmapfe to new platforms, -fix bugs, and add new features. You are highly encouraged -to send your changes to Fyodor for possible incorporation -into the main Nmap distribution. By sending these changes -to Fyodor or nmap-hackers, it is assumed that you are -offering Fyodor the unlimited, non-exclusive right to reuse, -modify, and relicense the code. If you wish to specify -special license conditions of your contributions, please -state them up front. -.Sp -This program is distributed in the hope that it will be useful, but -.B WITHOUT ANY WARRANTY; -without even the implied warranty of -.B MERCHANTABILITY -or -.B FITNESS FOR A PARTICULAR PURPOSE. -See the GNU -General Public License for more details (it is in the COPYING file of -the -.I nmap -distribution). -.Sp -It should also be noted that Nmap has been known to crash -certain poorly written applications, TCP/IP stacks, and even -operating systems. -.B Nmap should never be run against mission critical systems -unless you are prepared to suffer downtime. We acknowledge -here that Nmap may crash your systems or networks and we -disclaim all liability for any damage or problems Nmap could -cause. diff --git a/docs/xnmap.1 b/docs/xnmap.1 deleted file mode 100644 index 778c1d5fd..000000000 --- a/docs/xnmap.1 +++ /dev/null @@ -1 +0,0 @@ -.so man1/nmapfe.1 diff --git a/nmap.spec.in b/nmap.spec.in index 92a8bcee5..89c7175db 100644 --- a/nmap.spec.in +++ b/nmap.spec.in @@ -3,15 +3,9 @@ %define release 1 %define prefix /usr -# To not build the frontend, add: -# --define "buildfe 0" -# ...to the rpm build command-line # To build a static rpm, add: # --define "static 1" - -%if "%{buildfe}" != "0" -%define buildfe 1 -%endif +# ...to the rpm build command-line Summary: Network exploration tool and security scanner Name: %{name} @@ -37,18 +31,6 @@ sunRPC scanning, and more. Most Unix and Windows platforms are supported in both GUI and commandline modes. Several popular handheld devices are also supported, including the Sharp Zaurus and the iPAQ. -%if "%{buildfe}" == "1" -%package frontend -Summary: Gtk+ frontend for nmap -Group: Applications/System -Requires: nmap, gtk2 -BuildPreReq: gtk2-devel -Version: %{version} -%description frontend -This package includes nmapfe, a Gtk+ frontend for nmap. The nmap package must -be installed before installing nmap-frontend. -%endif - %prep %setup -q @@ -72,14 +54,6 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}/share/applications strip $RPM_BUILD_ROOT%{prefix}/bin/* || : gzip $RPM_BUILD_ROOT%{prefix}/share/man/man1/* || : -%if "%{buildfe}" == "1" -%post frontend -%endif - -%if "%{buildfe}" == "1" -%postun frontend -%endif - %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT @@ -93,18 +67,11 @@ gzip $RPM_BUILD_ROOT%{prefix}/share/man/man1/* || : %{prefix}/share/man/man1/nmap.1.gz %{prefix}/libexec/nmap -%if "%{buildfe}" == "1" -%files frontend -%defattr(-,root,root) -%{prefix}/bin/nmapfe -%{prefix}/bin/xnmap -%{prefix}/share/applications/nmapfe.desktop -%{prefix}/share/man/man1/xnmap.1.gz -%{prefix}/share/man/man1/nmapfe.1.gz -%endif - %changelog +* Wed Oct 31 2007 David Fifield (david(a)bamsoftware.com) +- Remove references to buildfe (build the NmapFE frontend). + * Sat Sep 01 2004 Stephane Loeuillet (stephane.loeuillet(a)tiscali.fr) - Place .desktop file under ${prefix}/share/applications rather than ${prefix}/share/gnome/apps/Utilities diff --git a/nmapfe.desktop b/nmapfe.desktop deleted file mode 100644 index 277df3b61..000000000 --- a/nmapfe.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=NmapFE -GenericName=Security Scanner -Comment=GUI frontend for Nmap security/port scanner -Version=1.0 -TryExec=nmapfe -Exec=nmapfe -Icon=icon-network -Terminal=false -Type=Application -Categories=Application;Network;System;Security;GTK \ No newline at end of file diff --git a/nmapfe/Makefile.in b/nmapfe/Makefile.in deleted file mode 100644 index 2b5ea385f..000000000 --- a/nmapfe/Makefile.in +++ /dev/null @@ -1,296 +0,0 @@ -# Makefile.in -*- mode: fundamental; -*- Used by configure to create a -# Makefile. This file is so bloated because it was originally created -# with automake. It has been hand edited since then. - -SHELL = /bin/sh - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include - -DISTDIR = - -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ - -top_builddir = . - -ACLOCAL = aclocal -AUTOCONF = autoconf - -# INSTALL = @INSTALL@ -# INSTALL_PROGRAM = @INSTALL_PROGRAM@ -# INSTALL_DATA = @INSTALL_DATA@ -# INSTALL_SCRIPT = @INSTALL_SCRIPT@ -transform = @program_transform_name@ - -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -CC = @CC@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_CONFIG = @GTK_CONFIG@ -GTK_LIBS = @GTK_LIBS@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -# Should be set by makefile caller -VERSION = 0.9.5 - -bin_PROGRAMS = nmapfe - -nmapfe_SOURCES = \ - nmapfe.c \ - nmapfe_sig.c \ - nmapfe_error.c - -noinst_HEADERS = \ - nmapfe.h \ - nmapfe_sig.h \ - nmapfe_error.h - -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -PROGRAMS = $(bin_PROGRAMS) - -DEFS = @DEFS@ -DVERSION=\"$(VERSION)\" -DHAVE_CONFIG_H=1 -I$(srcdir) -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ -nmapfe_OBJECTS = nmapfe.o nmapfe_sig.o nmapfe_error.o -nmapfe_LDADD = $(LDADD) -nmapfe_DEPENDENCIES = -nmapfe_LDFLAGS = -CFLAGS = @CFLAGS@ $(DEFS) $(INCLUDES) $(CPPFLAGS) -# COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -COMPILE = $(CC) $(CFLAGS) -LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -HEADERS = $(noinst_HEADERS) - -DIST_COMMON = Makefile.in aclocal.m4 configure configure.ac \ -install-sh - - -DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) - -TAR = tar -GZIP = --best -DEP_FILES = -SOURCES = $(nmapfe_SOURCES) -OBJECTS = $(nmapfe_OBJECTS) - -all: Makefile $(PROGRAMS) $(HEADERS) - -.SUFFIXES: -.SUFFIXES: .S .c .o .s -# $(srcdir)/Makefile.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) -# cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) - cd $(top_builddir) \ - && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status - -$(ACLOCAL_M4): configure.ac - cd $(srcdir) && $(ACLOCAL) - -config.status: $(srcdir)/configure - $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) - -mostlyclean-binPROGRAMS: - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) - -distclean-binPROGRAMS: - -maintainer-clean-binPROGRAMS: - -.s.o: - $(COMPILE) -c $< - -.S.o: - $(COMPILE) -c $< - -mostlyclean-compile: - -rm -f *.o core *.core - -clean-compile: - -distclean-compile: - -rm -f *.tab.c - -maintainer-clean-compile: - -nmapfe: $(nmapfe_OBJECTS) $(nmapfe_DEPENDENCIES) - @rm -f nmapfe - $(LINK) $(nmapfe_LDFLAGS) $(nmapfe_OBJECTS) $(nmapfe_LDADD) $(LIBS) - -tags: TAGS - -ID: $(HEADERS) $(SOURCES) $(LISP) - here=`pwd` && cd $(srcdir) \ - && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP) - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS)'; \ - unique=`for i in $$list; do echo $$i; done | \ - awk ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) - -mostlyclean-tags: - -clean-tags: - -distclean-tags: - -rm -f TAGS ID - -maintainer-clean-tags: - -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - -rm -rf $(distdir) - GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz - mkdir $(distdir)/=build - mkdir $(distdir)/=inst - dc_install_base=`cd $(distdir)/=inst && pwd`; \ - cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ - && $(MAKE) \ - && $(MAKE) dvi \ - && $(MAKE) check \ - && $(MAKE) install \ - && $(MAKE) installcheck \ - && $(MAKE) dist - -rm -rf $(distdir) - @echo "========================"; \ - echo "$(distdir).tar.gz is ready for distribution"; \ - echo "========================" -dist: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -dist-all: distdir - -chmod -R a+r $(distdir) - GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) - -rm -rf $(distdir) -distdir: $(DISTFILES) - -rm -rf $(distdir) - mkdir $(distdir) - -chmod 777 $(distdir) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ -# cd $(top_srcdir) \ -# && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile - @for file in $(DISTFILES); do \ - d=$(srcdir); \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file; \ - done - -# DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) - -# -include $(DEP_FILES) - -mostlyclean-depend: - -clean-depend: - -distclean-depend: - -maintainer-clean-depend: - -rm -rf .deps - -.c.o: - @echo '$(COMPILE) -c $<'; \ - $(COMPILE) -c $< - -.c.lo: - @echo '$(LTCOMPILE) -c $<'; \ - $(LTCOMPILE) -c $< - @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \ - < .deps/$(*F).p > .deps/$(*F).P - @-rm -f .deps/$(*F).p -info: -dvi: -check: all - $(MAKE) -installcheck: - - -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -rm -f Makefile $(DISTCLEANFILES) - -rm -f config.cache config.log stamp-h stamp-h[0-9]* - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-binPROGRAMS mostlyclean-compile \ - mostlyclean-tags mostlyclean-depend mostlyclean-generic - -clean: clean-binPROGRAMS clean-compile clean-tags clean-depend \ - clean-generic mostlyclean - -distclean: distclean-binPROGRAMS distclean-compile distclean-tags \ - distclean-depend distclean-generic clean - -rm -f config.status - -maintainer-clean: maintainer-clean-binPROGRAMS maintainer-clean-compile \ - maintainer-clean-tags maintainer-clean-depend \ - maintainer-clean-generic distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - -rm -f config.status - -.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ -maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ -mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile tags mostlyclean-tags distclean-tags \ -clean-tags maintainer-clean-tags distdir mostlyclean-depend \ -distclean-depend clean-depend maintainer-clean-depend info dvi \ -installcheck install-exec install-data install uninstall all \ -installdirs mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/nmapfe/NmapFE.dsp b/nmapfe/NmapFE.dsp deleted file mode 100644 index 39a0e88f1..000000000 --- a/nmapfe/NmapFE.dsp +++ /dev/null @@ -1,162 +0,0 @@ -# Microsoft Developer Studio Project File - Name="NmapFE" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=NmapFE - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "NmapFE.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "NmapFE.mak" CFG="NmapFE - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "NmapFE - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "NmapFE - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "NmapFE - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\nbase" /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib glib-1.3.lib gdk-1.3.lib gtk-1.3.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "NmapFE - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "NmapFE___Win32_Debug" -# PROP BASE Intermediate_Dir "NmapFE___Win32_Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "NmapFE___Win32_Debug" -# PROP Intermediate_Dir "NmapFE___Win32_Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\nbase" /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib glib-1.3.lib gdk-1.3.lib gtk-1.3.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "NmapFE - Win32 Release" -# Name "NmapFE - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Group "Nbase Source" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\nbase\getopt.c -# End Source File -# Begin Source File - -SOURCE=..\nbase\inet_aton.c -# End Source File -# Begin Source File - -SOURCE=..\nbase\nbase_misc.c -# End Source File -# Begin Source File - -SOURCE=..\nbase\nbase_str.c -# End Source File -# Begin Source File - -SOURCE=..\nbase\nbase_time.c -# End Source File -# End Group -# Begin Source File - -SOURCE=.\nmapfe.c -# End Source File -# Begin Source File - -SOURCE=.\nmapfe_error.c -# End Source File -# Begin Source File - -SOURCE=.\nmapfe_sig.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Group "Nbase Headers" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\nbase\getopt.h -# End Source File -# Begin Source File - -SOURCE=..\nbase\nbase.h -# End Source File -# Begin Source File - -SOURCE=..\nbase\nbase_winconfig.h -# End Source File -# End Group -# Begin Source File - -SOURCE=.\nmapfe.h -# End Source File -# Begin Source File - -SOURCE=.\nmapfe_error.h -# End Source File -# Begin Source File - -SOURCE=.\nmapfe_sig.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/nmapfe/aclocal.m4 b/nmapfe/aclocal.m4 deleted file mode 100644 index 0cb7db3e7..000000000 --- a/nmapfe/aclocal.m4 +++ /dev/null @@ -1,210 +0,0 @@ -# generated automatically by aclocal 1.9.2 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# Configure paths for GTK+ -# Owen Taylor 1997-2001 - -dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, -dnl pass to pkg-config -dnl -AC_DEFUN([AM_PATH_GTK_2_0], -[dnl -dnl Get the cflags and libraries from pkg-config -dnl -AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], - , enable_gtktest=yes) - - pkg_config_args=gtk+-2.0 - for module in . $4 - do - case "$module" in - gthread) - pkg_config_args="$pkg_config_args gthread-2.0" - ;; - esac - done - - no_gtk="" - - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - - if test x$PKG_CONFIG != xno ; then - if pkg-config --atleast-pkgconfig-version 0.7 ; then - : - else - echo "*** pkg-config too old; version 0.7 or better required." - no_gtk=yes - PKG_CONFIG=no - fi - else - no_gtk=yes - fi - - min_gtk_version=ifelse([$1], ,2.0.0,$1) - AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) - - if test x$PKG_CONFIG != xno ; then - ## don't try to run the test against uninstalled libtool libs - if $PKG_CONFIG --uninstalled $pkg_config_args; then - echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" - enable_gtktest=no - fi - - if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then - : - else - no_gtk=yes - fi - fi - - if test x"$no_gtk" = x ; then - GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` - GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` - gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gtktest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" -dnl -dnl Now check if the installed GTK+ is sufficiently new. (Also sanity -dnl checks the results of pkg-config to some extent) -dnl - rm -f conf.gtktest - AC_TRY_RUN([ -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtktest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtk_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - if ((gtk_major_version != $gtk_config_major_version) || - (gtk_minor_version != $gtk_config_minor_version) || - (gtk_micro_version != $gtk_config_micro_version)) - { - printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If pkg-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); - printf("*** to point to the correct configuration files\n"); - } - else if ((gtk_major_version != GTK_MAJOR_VERSION) || - (gtk_minor_version != GTK_MINOR_VERSION) || - (gtk_micro_version != GTK_MICRO_VERSION)) - { - printf("*** GTK+ header files (version %d.%d.%d) do not match\n", - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - } - else - { - if ((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); - printf("*** correct copy of pkg-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtk" = x ; then - AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$PKG_CONFIG" = "no" ; then - echo "*** A new enough version of pkg-config was not found." - echo "*** See http://pkgconfig.sourceforge.net" - else - if test -f conf.gtktest ; then - : - else - echo "*** Could not run GTK+ test program, checking why..." - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK+ or finding the wrong" - echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) - rm -f conf.gtktest -]) - diff --git a/nmapfe/config.guess b/nmapfe/config.guess deleted file mode 100755 index 10a826017..000000000 --- a/nmapfe/config.guess +++ /dev/null @@ -1,1476 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - -timestamp='2005-12-23' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[345]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/nmapfe/config.sub b/nmapfe/config.sub deleted file mode 100755 index 8f7b7381c..000000000 --- a/nmapfe/config.sub +++ /dev/null @@ -1,1605 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. - -timestamp='2005-12-23' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m32c) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - m32c-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/nmapfe/configure b/nmapfe/configure deleted file mode 100755 index 0d13b1c27..000000000 --- a/nmapfe/configure +++ /dev/null @@ -1,3688 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. -# -# Copyright (C) 2003 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="nmapfe.c" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT PKG_CONFIG GTK_CFLAGS GTK_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os NBASEDIR LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-gtktest do not try to compile and run a test GTK+ program - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-libnbase=DIR Look for nbase include/libs in DIR - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - - -#AM_INIT_AUTOMAKE(nmapfe, 0.9.5) - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi - -fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - -ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; - * ) break;; - esac -done -else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_compiler_gnu=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Check whether --enable-gtktest or --disable-gtktest was given. -if test "${enable_gtktest+set}" = set; then - enableval="$enable_gtktest" - -else - enable_gtktest=yes -fi; - - pkg_config_args=gtk+-2.0 - for module in . - do - case "$module" in - gthread) - pkg_config_args="$pkg_config_args gthread-2.0" - ;; - esac - done - - no_gtk="" - - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - if test x$PKG_CONFIG != xno ; then - if pkg-config --atleast-pkgconfig-version 0.7 ; then - : - else - echo "*** pkg-config too old; version 0.7 or better required." - no_gtk=yes - PKG_CONFIG=no - fi - else - no_gtk=yes - fi - - min_gtk_version=2.0.0 - echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 -echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6 - - if test x$PKG_CONFIG != xno ; then - ## don't try to run the test against uninstalled libtool libs - if $PKG_CONFIG --uninstalled $pkg_config_args; then - echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" - enable_gtktest=no - fi - - if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then - : - else - no_gtk=yes - fi - fi - - if test x"$no_gtk" = x ; then - GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` - GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` - gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_gtktest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$GTK_LIBS $LIBS" - rm -f conf.gtktest - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gtktest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gtk_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gtk_version"); - exit(1); - } - - if ((gtk_major_version != $gtk_config_major_version) || - (gtk_minor_version != $gtk_config_minor_version) || - (gtk_micro_version != $gtk_config_micro_version)) - { - printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf ("*** was found! If pkg-config was correct, then it is best\n"); - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); - printf("*** to point to the correct configuration files\n"); - } - else if ((gtk_major_version != GTK_MAJOR_VERSION) || - (gtk_minor_version != GTK_MINOR_VERSION) || - (gtk_micro_version != GTK_MICRO_VERSION)) - { - printf("*** GTK+ header files (version %d.%d.%d) do not match\n", - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - } - else - { - if ((gtk_major_version > major) || - ((gtk_major_version == major) && (gtk_minor_version > minor)) || - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", - gtk_major_version, gtk_minor_version, gtk_micro_version); - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); - printf("*** correct copy of pkg-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} - -_ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -no_gtk=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gtk" = x ; then - echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 -echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6 - LIBS="$LIBS $GTK_LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - if test "$PKG_CONFIG" = "no" ; then - echo "*** A new enough version of pkg-config was not found." - echo "*** See http://pkgconfig.sourceforge.net" - else - if test -f conf.gtktest ; then - : - else - echo "*** Could not run GTK+ test program, checking why..." - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GTK_CFLAGS" - LIBS="$LIBS $GTK_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -int -main () -{ - return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GTK+ or finding the wrong" - echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GTK_CFLAGS="" - GTK_LIBS="" - cat >>confdefs.h <<\_ACEOF -#define MISSING_GTK 1 -_ACEOF - \ - { echo "$as_me:$LINENO: WARNING: NMAPFE WILL NOT BE BUILT -- BUT NMAP SHOULD STILL WORK " >&5 -echo "$as_me: WARNING: NMAPFE WILL NOT BE BUILT -- BUT NMAP SHOULD STILL WORK " >&2;} - fi - - - rm -f conf.gtktest - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - - - -linux=no -macosx=no -needs_cpp_precomp=no -case "$host" in - *-netbsd* | *-knetbsd*-gnu) - cat >>confdefs.h <<\_ACEOF -#define NETBSD 1 -_ACEOF - - ;; - *-openbsd*) - cat >>confdefs.h <<\_ACEOF -#define OPENBSD 1 -_ACEOF - - ;; - *-sgi-irix5*) - cat >>confdefs.h <<\_ACEOF -#define IRIX 1 -_ACEOF - - if test -z "$GCC"; then - sgi_cc=yes - fi - ;; - *-sgi-irix6*) - cat >>confdefs.h <<\_ACEOF -#define IRIX 1 -_ACEOF - - if test -z "$GCC"; then - sgi_cc=yes - fi - ;; - *-hpux*) - cat >>confdefs.h <<\_ACEOF -#define HPUX 1 -_ACEOF - - ;; - *-solaris2.0*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-solaris2.[1-9][0-9]*) - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-solaris2.1*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-solaris2.2*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-solaris2.3*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-solaris2.4*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-solaris2.5.1) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-solaris*) - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - ;; - *-sunos4*) - cat >>confdefs.h <<\_ACEOF -#define SUNOS 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SPRINTF_RETURNS_STRING 1 -_ACEOF - - ;; - *-linux*) - linux=yes - cat >>confdefs.h <<\_ACEOF -#define LINUX 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define PCAP_TIMEOUT_IGNORED 1 -_ACEOF - # libpcap doesn't even LOOK at - # the timeout you give it under Linux - ;; - *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) - cat >>confdefs.h <<\_ACEOF -#define FREEBSD 1 -_ACEOF - - ;; - *-bsdi*) - cat >>confdefs.h <<\_ACEOF -#define BSDI 1 -_ACEOF - - ;; - *-apple-darwin*) - macosx=yes - cat >>confdefs.h <<\_ACEOF -#define MACOSX 1 -_ACEOF - - needs_cpp_precomp=yes - ;; -esac - -if test "x$GCC" = "xyes"; then - if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then - CFLAGS="$CFLAGS -Wall" - fi -fi - -if test $needs_cpp_precomp = yes; then - CFLAGS="-no-cpp-precomp $CFLAGS" -fi - - -# Check whether --with-libnbase or --without-libnbase was given. -if test "${with_libnbase+set}" = set; then - withval="$with_libnbase" - case "$with_libnbase" in - yes) - ;; - *) - NBASEDIR="$with_libnbase" - ;; - esac -else - NBASEDIR="../nbase" - -fi; -LDFLAGS="$LDFLAGS -L$NBASEDIR" -CFLAGS="$CFLAGS -I$NBASEDIR" -LIBS="$LIBS -lnbase" - - - ac_config_files="$ac_config_files Makefile" -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t -s,@GTK_LIBS@,$GTK_LIBS,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@NBASEDIR@,$NBASEDIR,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/nmapfe/configure.ac b/nmapfe/configure.ac deleted file mode 100644 index 964b15106..000000000 --- a/nmapfe/configure.ac +++ /dev/null @@ -1,123 +0,0 @@ -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_2_0(2.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 Host specific hacks -AC_CANONICAL_HOST - - -linux=no -macosx=no -needs_cpp_precomp=no -case "$host" in - *-netbsd* | *-knetbsd*-gnu) - AC_DEFINE(NETBSD) - ;; - *-openbsd*) - AC_DEFINE(OPENBSD) - ;; - *-sgi-irix5*) - AC_DEFINE(IRIX) - if test -z "$GCC"; then - sgi_cc=yes - fi - ;; - *-sgi-irix6*) - AC_DEFINE(IRIX) - if test -z "$GCC"; then - sgi_cc=yes - fi - ;; - *-hpux*) - AC_DEFINE(HPUX) - ;; - *-solaris2.0*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - ;; - *-solaris2.[[1-9]][[0-9]]*) - AC_DEFINE(SOLARIS) - ;; - *-solaris2.1*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - ;; - *-solaris2.2*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - ;; - *-solaris2.3*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - ;; - *-solaris2.4*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - ;; - *-solaris2.5.1) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - ;; - *-solaris*) - AC_DEFINE(SOLARIS) - ;; - *-sunos4*) - AC_DEFINE(SUNOS) - AC_DEFINE(SPRINTF_RETURNS_STRING) - ;; - *-linux*) - linux=yes - AC_DEFINE(LINUX) - AC_DEFINE(PCAP_TIMEOUT_IGNORED) # libpcap doesn't even LOOK at - # the timeout you give it under Linux - ;; - *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) - AC_DEFINE(FREEBSD) - ;; - *-bsdi*) - AC_DEFINE(BSDI) - ;; - *-apple-darwin*) - macosx=yes - AC_DEFINE(MACOSX) - needs_cpp_precomp=yes - ;; -esac - -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 - -if test $needs_cpp_precomp = yes; then - CFLAGS="-no-cpp-precomp $CFLAGS" -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) diff --git a/nmapfe/nmapfe.c b/nmapfe/nmapfe.c deleted file mode 100644 index 9cfad8c5d..000000000 --- a/nmapfe/nmapfe.c +++ /dev/null @@ -1,1605 +0,0 @@ - -/*************************************************************************** - * nmapfe.c -- Handles widget placement for drawing the main NmapFE GUI * - * interface. * - * * - ***********************IMPORTANT NMAP LICENSE TERMS************************ - * * - * The Nmap Security Scanner is (C) 1996-2006 Insecure.Com LLC. Nmap is * - * also a registered trademark of Insecure.Com LLC. This program is free * - * software; you may redistribute and/or modify it under the terms of the * - * GNU General Public License as published by the Free Software * - * Foundation; Version 2 with the clarifications and exceptions described * - * below. This guarantees your right to use, modify, and redistribute * - * this software under certain conditions. If you wish to embed Nmap * - * technology into proprietary software, we sell alternative licenses * - * (contact sales@insecure.com). Dozens of software vendors already * - * license Nmap technology such as host discovery, port scanning, OS * - * detection, and version detection. * - * * - * Note that the GPL places important restrictions on "derived works", yet * - * it does not provide a detailed definition of that term. To avoid * - * misunderstandings, we consider an application to constitute a * - * "derivative work" for the purpose of this license if it does any of the * - * following: * - * o Integrates source code from Nmap * - * o Reads or includes Nmap copyrighted data files, such as * - * nmap-os-fingerprints or nmap-service-probes. * - * o Executes Nmap and parses the results (as opposed to typical shell or * - * execution-menu apps, which simply display raw Nmap output and so are * - * not derivative works.) * - * o Integrates/includes/aggregates Nmap into a proprietary executable * - * installer, such as those produced by InstallShield. * - * o Links to a library or executes a program that does any of the above * - * * - * The term "Nmap" should be taken to also include any portions or derived * - * works of Nmap. This list is not exclusive, but is just meant to * - * clarify our interpretation of derived works with some common examples. * - * These restrictions only apply when you actually redistribute Nmap. For * - * example, nothing stops you from writing and selling a proprietary * - * front-end to Nmap. Just distribute it by itself, and point people to * - * http://insecure.org/nmap/ to download Nmap. * - * * - * We don't consider these to be added restrictions on top of the GPL, but * - * just a clarification of how we interpret "derived works" as it applies * - * to our GPL-licensed Nmap product. This is similar to the way Linus * - * Torvalds has announced his interpretation of how "derived works" * - * applies to Linux kernel modules. Our interpretation refers only to * - * Nmap - we don't speak for any other GPL products. * - * * - * If you have any questions about the GPL licensing restrictions on using * - * Nmap in non-GPL works, we would be happy to help. As mentioned above, * - * we also offer alternative license to integrate Nmap into proprietary * - * applications and appliances. These contracts have been sold to dozens * - * of software vendors, and generally include a perpetual license as well * - * as providing for priority support and updates as well as helping to * - * fund the continued development of Nmap technology. Please email * - * sales@insecure.com for further information. * - * * - * As a special exception to the GPL terms, Insecure.Com LLC grants * - * permission to link the code of this program with any version of the * - * OpenSSL library which is distributed under a license identical to that * - * listed in the included Copying.OpenSSL file, and distribute linked * - * combinations including the two. You must obey the GNU GPL in all * - * respects for all of the code used other than OpenSSL. If you modify * - * this file, you may extend this exception to your version of the file, * - * but you are not obligated to do so. * - * * - * If you received these files with a written license agreement or * - * contract stating terms other than the terms above, then that * - * alternative license agreement takes precedence over these comments. * - * * - * Source is provided to this software because we believe users have a * - * right to know exactly what a program is going to do before they run it. * - * This also allows you to audit the software for security holes (none * - * have been found so far). * - * * - * Source code also allows you to port Nmap to new platforms, fix bugs, * - * and add new features. You are highly encouraged to send your changes * - * to fyodor@insecure.org for possible incorporation into the main * - * distribution. By sending these changes to Fyodor or one the * - * Insecure.Org development mailing lists, it is assumed that you are * - * offering Fyodor and Insecure.Com LLC the unlimited, non-exclusive right * - * to reuse, modify, and relicense the code. Nmap will always be * - * available Open Source, but this is important because the inability to * - * relicense code has caused devastating problems for other Free Software * - * projects (such as KDE and NASM). We also occasionally relicense the * - * code to third parties as discussed above. If you wish to specify * - * special license conditions of your contributions, just say so when you * - * send them. * - * * - * This program is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * General Public License for more details at * - * http://www.gnu.org/copyleft/gpl.html , or in the COPYING file included * - * with Nmap. * - * * - ***************************************************************************/ - -/* $Id$ */ - - -/* Original Author: Zach - * Mail: key@aye.net - * IRC: EFNet as zach` or key in #bastards or #neatoelito - * AIM (Aol): GoldMatrix - * - * Change the source as you wish, but leave these comments.. - * - * Long live Aol and pr: Phreak. - */ - -#if MISSING_GTK -#error "Your system does not appear to have GTK (www.gtk.org) installed. Thus the Nmap X Front End will not compile. You should still be able to use Nmap the normal way (via text console). GUIs are for wimps anyway :)" -#else - - - -#include -#include - -#if HAVE_UNISTD_H -#include -#endif -#include - -#include - -#include "nmapfe.h" -#include "nmapfe_sig.h" - -/* Keep this global */ -struct NmapFEoptions opt; - -void openLog(char *); -void saveLog(char *); -static void LogOpen_callback (void); -static void LogSave_callback (void); -static void LogAppend_callback (void); -static void Help_callback (void); -static void Version_callback (void); -static void About_callback (void); -static void Quit_callback (void); -static void Colourize_callback (GtkAction *action, GtkRadioAction *current); - -void scanType_cb (GtkComboBox *widget, gpointer data); - -static GtkWidget *main_win; - -static GtkActionEntry menu_entries[] = { - { "FileMenu", NULL, "_File" }, /* File menu */ - { "LogOpen", NULL, "_Open Log", NULL, "Open log file", LogOpen_callback }, - { "LogSave", NULL, "_Save Log", NULL, "Save log file", LogSave_callback }, - { "Quit", NULL, "_Quit", NULL, "Quit the program", Quit_callback }, - { "ViewMenu", NULL, "_View" }, /* View menu */ - { "HelpMenu", NULL, "_Help" }, /* Help menu */ - { "Help", NULL, "_Help", NULL, NULL, Help_callback }, - { "Version", NULL, "_Nmap version", NULL, NULL, Version_callback }, - { "About", NULL, "_About NMapFE...", NULL, NULL, About_callback } -}; -static GtkToggleActionEntry menu_entries_toggle[] = { - { "LogAppend", NULL, "Append log", NULL, NULL, LogAppend_callback } -}; -static GtkRadioActionEntry menu_entries_radio[] = { - { "View_RGB", NULL, "Coloured", NULL, NULL, 1}, - { "View_BW", NULL, "Black & White", NULL, NULL, 2} -}; - -static const char *menu_description = - "" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - ""; - -static Entry scanentries[] = { - { "SYN Stealth Scan", SYN_SCAN, TRUE }, - { "Connect Scan", CONNECT_SCAN, FALSE }, - { "ACK Stealth Scan", ACK_SCAN, TRUE }, - { "FIN|ACK Stealth Scan", MAIMON_SCAN, TRUE }, - { "FIN Stealth Scan", FIN_SCAN, TRUE }, - { "NULL Stealth Scan", NULL_SCAN, TRUE }, - { "XMas Tree Stealth Scan", XMAS_SCAN, TRUE }, - { "TCP Window Scan", WIN_SCAN, TRUE }, - { "UDP Port Scan", UDP_SCAN, TRUE }, - { "IP Protocol Scan", PROT_SCAN, TRUE }, - { "Ping Sweep", PING_SCAN, FALSE }, - { "Host List", LIST_SCAN, FALSE }, - { "FTP Bounce Attack", BOUNCE_SCAN, FALSE }, - { "Idle Scan", IDLE_SCAN, TRUE }, - { NULL, 0, FALSE } -}; - - -static gchar *throttleEntries[] = { - "Paranoid Throttling", - "Sneaky Throttling", - "Polite Throttling", - "Normal Throttling", - "Aggressive Throttling", - "Insane Throttling", - NULL -}; - -static gchar *resolveEntries[] = { - "Always", - "When Required", - "Never", - NULL -}; - -static gchar *protportEntries[] = { - "Default", - "All", - "Most Important [fast]", - "Range Given Below", - NULL -}; - -static gchar *outputFormatEntries[] = { - "Normal", - "grep-able", - "XML", - "All", -#if GTK_CHECK_VERSION(2,6,0) - "", -#endif - "ScriptKiddie" -}; - -static void -LogOpen_callback (void) { - static char filename[FILENAME_MAX+1] = ""; - gtk_widget_show(create_fileSelection("Open Log", filename, openLog, NULL)); -} -static void -LogSave_callback (void) { - static char filename[FILENAME_MAX+1] = ""; - gtk_widget_show(create_fileSelection("Save Log", filename, saveLog, NULL)); -} -static void -Quit_callback (void) { - stop_scan(); - gtk_main_quit(); -} -static void -Colourize_callback (GtkAction *action, GtkRadioAction *current) { - opt.viewValue = gtk_radio_action_get_current_value(current); -} -static void -LogAppend_callback (void) { - opt.appendLog = !opt.appendLog; -} -static void -Version_callback (void) { - execute("nmap -V"); -} -static void -Help_callback (void) { - gtk_widget_show(create_helpDialog()); -} -static void -About_callback (void) { -#if GTK_CHECK_VERSION(2,6,0) - static const gchar *authors[] = - { - "Nmap is written by Fyodor ", - "with the help of many-many others." - "\n", - "NmapFE originally written by Zach Smith ", - "GUI rework by:", - " Peter Marschall ", - "Ported to GTK2 by:", - " Mike Basinger ", - " Meethune Bhowmick ", - NULL - }; - gtk_show_about_dialog ( GTK_WINDOW(main_win), - "authors", authors, - "comments", "Frontend for Nmap security scanner", - "name", "Nmap & NmapFE", - "version", VERSION, - "website", "http://www.insecure.org/nmap", - NULL); -#else - GtkWidget *aboutDialog; - GtkWidget *vbox; - GtkWidget *notebook; - GtkWidget *text; - GtkWidget *label; - - aboutDialog = gtk_dialog_new_with_buttons("About NmapFE & Nmap", - NULL, - GTK_DIALOG_MODAL, - GTK_STOCK_OK, - GTK_RESPONSE_NONE, - NULL); - - g_signal_connect_swapped (aboutDialog, - "response", - G_CALLBACK (gtk_widget_destroy), - aboutDialog); - - gtk_widget_set_usize(aboutDialog, 200, 200); - gtk_window_position(GTK_WINDOW(aboutDialog), GTK_WIN_POS_CENTER); - - vbox = GTK_DIALOG(aboutDialog)->vbox; - - notebook = gtk_notebook_new(); - gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); - - label = gtk_label_new("NmapFE"); - text = gtk_label_new("Author: Zach Smith\n" - "EMail: key@aye.net\n" - "http://a.linuxbox.com\n" - "Written in: C/GTK\n" - "\n" - "GUI rewritten by:\n" - "Author: Peter Marschall\n" - "EMail: peter@adpm.de"); - - gtk_widget_show(label); - gtk_widget_show(text); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), text, label); - - label = gtk_label_new("Nmap"); - text = gtk_label_new("Author: Fyodor\n" - "EMail: fyodor@insecure.org\n" - "http://www.insecure.org/nmap\n" - "Written in: C++"); - - gtk_widget_show(label); - gtk_widget_show(text); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), text, label); - - gtk_widget_show_all(aboutDialog); - -#endif - -} -#if GTK_CHECK_VERSION(2,6,0) -/* FIXME: This needs to be rewritten because it's an ugly hack :( - * See below for comment... - */ -static gboolean -is_separator (GtkTreeModel *model, - GtkTreeIter *iter, - gpointer data) -{ - GtkTreePath *path; - gboolean result; - - path = gtk_tree_model_get_path (model, iter); - /* FIXME: Here we should see whether the contents of the row - * equals ". But it works for now... :) - */ - result = gtk_tree_path_get_indices (path)[0] == SEPARATOR; - gtk_tree_path_free (path); - - return result; -} -#endif -static GtkTreeModel * -create_dropdown_store(Entry *data, gboolean is_root) -{ - GtkTreeIter iter; - GtkTreeStore *store; - gint i; - - store = gtk_tree_store_new (1, G_TYPE_STRING); - - for (i = 0; data[i].scan; i++) { - if (is_root || (data[i].rootonly == is_root)) { - gtk_tree_store_append(store, &iter, NULL); - gtk_tree_store_set(store, &iter, 0, data[i].scan, -1); - } - } - return GTK_TREE_MODEL (store); -} - -GtkWidget* create_main_win() -{ - GtkWidget *main_vbox; - GtkWidget *menubar; -GtkWidget *hbox; -GtkWidget *vbox; -GtkWidget *label; -GtkWidget *button; -GtkWidget *notebook; -GtkWidget *nblabel; -GtkWidget *nbpage; -GtkWidget *frame; -GtkWidget *table; -GtkAdjustment *adjust; - - GtkAccelGroup *accel_group; - GtkActionGroup *action_group; - GtkUIManager *ui_manager; - - GError *error; - - /* initialize our options */ - opt.viewValue = 1; - opt.appendLog = FALSE; - opt.scanValue = SYN_SCAN; - opt.throttleValue = NORMAL_THROTTLE; - opt.resolveValue = DEFAULT_RESOLVE; - opt.protportValue = DEFAULT_PROTPORT; - opt.outputFormatValue = NORMAL_OUTPUT; - -#ifdef WIN32 - opt.isr00t = 1; - /* for nmap version */ -#include "nmap.h" -#include "nmap_winconfig.h" -#define VERSION NMAP_VERSION -#else - opt.isr00t = !geteuid(); -#endif - -/* main (toplevel) window */ - main_win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title(GTK_WINDOW(main_win), "Nmap Front End v" VERSION); - gtk_window_set_position (GTK_WINDOW (main_win), GTK_WIN_POS_CENTER); - g_signal_connect (GTK_OBJECT (main_win), "delete_event", - GTK_SIGNAL_FUNC(Quit_callback), NULL); - -/* vertical box for menu bar, input, output and status fields */ - main_vbox = gtk_vbox_new(FALSE, 0); - gtk_container_add (GTK_CONTAINER (main_win), main_vbox); - gtk_widget_show (main_vbox); - - action_group = gtk_action_group_new ("MenuActions"); - gtk_action_group_add_actions (action_group, menu_entries, - G_N_ELEMENTS (menu_entries), main_win); - gtk_action_group_add_radio_actions (action_group, menu_entries_radio, - G_N_ELEMENTS (menu_entries_radio), 0, - G_CALLBACK(Colourize_callback), main_win); - - gtk_action_group_add_toggle_actions (action_group, menu_entries_toggle, - G_N_ELEMENTS (menu_entries_toggle), main_win); - - ui_manager = gtk_ui_manager_new (); - gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); - - error = NULL; - if (!gtk_ui_manager_add_ui_from_string (ui_manager, menu_description, -1, &error)) { - g_message ("building menus failed: %s", error->message); - g_error_free (error); - exit (EXIT_FAILURE); - } - - /* main menu */ - menubar = gtk_ui_manager_get_widget (ui_manager, "/MainMenu"); - gtk_box_pack_start (GTK_BOX (main_vbox), menubar, - FALSE, TRUE, 0); - gtk_widget_show (menubar); - /* Install the accelerator table in the main window */ - accel_group = gtk_ui_manager_get_accel_group (ui_manager); - gtk_window_add_accel_group (GTK_WINDOW (main_win), accel_group); - -/* upper hbox for horizontal alignment */ - hbox = gtk_hbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); - gtk_box_pack_start(GTK_BOX(main_vbox), hbox, FALSE, FALSE, 10); - -/* Target(s) entry field and label */ - label = gtk_label_new("Target(s):"); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - gtk_widget_show(label); - - opt.targetHost = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.targetHost), 256); - GTK_WIDGET_SET_FLAGS(opt.targetHost, GTK_CAN_DEFAULT); - gtk_widget_grab_focus(opt.targetHost); - gtk_entry_set_text(GTK_ENTRY(opt.targetHost), "127.0.0.1"); - g_signal_connect(GTK_OBJECT(opt.targetHost), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - gtk_box_pack_start(GTK_BOX(hbox), opt.targetHost, TRUE, TRUE, 0); - gtk_widget_show(opt.targetHost); - -/* Exit button (rightmost in hbox) */ - button = gtk_button_new_with_label("Exit"); - /*gtk_object_set(GTK_OBJECT(button), "width", 48, NULL);*/ - g_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(Quit_callback), NULL); - gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); - gtk_widget_show(button); - -/* Scan button (2nd right in hbox) */ - opt.scanButton = gtk_toggle_button_new_with_label("Scan"); - /*gtk_object_set(GTK_OBJECT(opt.scanButton), "width", 72, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.scanButton), "toggled", - GTK_SIGNAL_FUNC(scanButton_toggled_cb), NULL); - gtk_box_pack_end(GTK_BOX(hbox), opt.scanButton, FALSE, FALSE, 0); - gtk_widget_show(opt.scanButton); - - gtk_widget_show(hbox); - - -/* notebook in vbox below hbox */ - notebook = gtk_notebook_new(); - gtk_container_set_border_width(GTK_CONTAINER(notebook), 5); - -/* Scan page (first in notebook) */ - nblabel = gtk_label_new("Scan"); - /* nbpage = gtk_vbox_new(FALSE, 5); */ - nbpage = gtk_table_new(5, 3, TRUE); - gtk_table_set_col_spacings(GTK_TABLE(nbpage), 5); - gtk_table_set_row_spacings(GTK_TABLE(nbpage), 5); - gtk_container_set_border_width(GTK_CONTAINER(nbpage), 5); - - frame = gtk_frame_new("Scan Type"); - /* gtk_box_pack_start(GTK_BOX(nbpage), frame, FALSE, FALSE, 0); */ - gtk_table_attach_defaults(GTK_TABLE(nbpage), frame, 0, 2, 0, 3); - - table = gtk_table_new(2, 4, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_table_set_col_spacings(GTK_TABLE(table), 5); - gtk_table_set_row_spacings(GTK_TABLE(table), 5); - gtk_container_add(GTK_CONTAINER(frame), table); - - /* Create "Scan Type" combobox */ - { - GtkCellRenderer *renderer; - GtkTreeModel *model; - model = create_dropdown_store (scanentries, - opt.isr00t ? TRUE : FALSE); - opt.scanType = gtk_combo_box_new_with_model (model); - g_object_unref (model); - - opt.scanValue = opt.isr00t ? SYN_SCAN : CONNECT_SCAN; - - gtk_table_attach_defaults (GTK_TABLE(table), opt.scanType, 0, 4, 0, 1); - gtk_widget_show (opt.scanType); - - renderer = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start ( - GTK_CELL_LAYOUT (opt.scanType), renderer, TRUE); - gtk_cell_layout_set_attributes ( - GTK_CELL_LAYOUT (opt.scanType), renderer, - "text", 0, - NULL); - g_object_unref(renderer); - - g_signal_connect(G_OBJECT(opt.scanType), "changed", - G_CALLBACK (scanType_cb), scanentries); - - } - - opt.scanRelayLabel = gtk_label_new("Relay Host:"); - gtk_label_set_justify(GTK_LABEL(opt.scanRelayLabel), GTK_JUSTIFY_LEFT); - if ((opt.scanValue != BOUNCE_SCAN) && (opt.scanValue != IDLE_SCAN)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanRelayLabel), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.scanRelayLabel, 0, 1, 1, 2); - gtk_widget_show(opt.scanRelayLabel); - - opt.scanRelay = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.scanRelay), 256); - /*gtk_object_set(GTK_OBJECT(opt.scanRelay), "width", 150, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.scanRelay), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((opt.scanValue != BOUNCE_SCAN) && (opt.scanValue != IDLE_SCAN)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanRelay), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.scanRelay, 1, 4, 1, 2); - gtk_widget_show(opt.scanRelay); - - gtk_widget_show(table); - gtk_widget_show(frame); - - - /* Scanned ports frame */ - { - gint i; - opt.protportFrame = gtk_frame_new("Scanned Ports"); - gtk_table_attach_defaults(GTK_TABLE(nbpage), opt.protportFrame, 2, 3, 0, 3); - - table = gtk_table_new(2, 2, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_table_set_col_spacings(GTK_TABLE(table), 5); - gtk_table_set_row_spacings(GTK_TABLE(table), 5); - gtk_container_add(GTK_CONTAINER(opt.protportFrame), table); - - opt.protportType = gtk_combo_box_new_text(); - - for(i = 0; protportEntries[i]; i++) { - gtk_combo_box_append_text(GTK_COMBO_BOX(opt.protportType), protportEntries[i]); - } - - g_signal_connect(G_OBJECT(opt.protportType), "changed", - G_CALLBACK (protportType_cb), NULL); - - gtk_table_attach_defaults(GTK_TABLE(table), opt.protportType, 0, 2, 0, 1); - - opt.protportLabel = gtk_label_new("Range:"); - gtk_label_set_justify(GTK_LABEL(opt.protportLabel), GTK_JUSTIFY_LEFT); - if (opt.protportValue != GIVEN_PROTPORT) - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportLabel), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.protportLabel, 0, 1, 1, 2); - gtk_widget_show(opt.protportLabel); - - opt.protportRange = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.protportRange), 256); - /*gtk_object_set(GTK_OBJECT(opt.protportRange), "width", 100, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.protportRange), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (opt.protportValue != GIVEN_PROTPORT) - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportRange), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.protportRange, 1, 2, 1, 2); - - gtk_widget_show_all(opt.protportFrame); - } - - - frame = gtk_frame_new("Scan Extensions"); - /* gtk_box_pack_start(GTK_BOX(nbpage), frame, FALSE, FALSE, 0); */ - gtk_table_attach_defaults(GTK_TABLE(nbpage), frame, 0, 2, 3, 5); - - table = gtk_table_new(1, 4, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_table_set_col_spacings(GTK_TABLE(table), 5); - gtk_table_set_row_spacings(GTK_TABLE(table), 5); - gtk_container_add(GTK_CONTAINER(frame), table); - - opt.RPCInfo = gtk_check_button_new_with_label("RPC Scan"); - g_signal_connect(GTK_OBJECT(opt.RPCInfo), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - gtk_table_attach_defaults(GTK_TABLE(table), opt.RPCInfo, 0, 1, 0, 1); - gtk_widget_show(opt.RPCInfo); - - opt.OSInfo = gtk_check_button_new_with_label("OS Detection"); - g_signal_connect(GTK_OBJECT(opt.OSInfo), "released", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (opt.isr00t) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt.OSInfo), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(opt.OSInfo), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.OSInfo, 2, 3, 0, 1); - gtk_widget_show(opt.OSInfo); - - - opt.VersionInfo = gtk_check_button_new_with_label("Version Probe"); - g_signal_connect(GTK_OBJECT(opt.VersionInfo), "released", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt.VersionInfo), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.VersionInfo, 3, 4, 0, 1); - gtk_widget_show(opt.VersionInfo); - - gtk_widget_show(table); - gtk_widget_show(frame); - - - gtk_widget_show(nblabel); - gtk_widget_show(nbpage); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); - - -/* Discover/Ping page (second in notebook) */ - nblabel = gtk_label_new("Discover"); - nbpage = gtk_table_new(4, 4, FALSE); - /* nbpage = gtk_vbox_new(FALSE, 5); */ - gtk_container_set_border_width(GTK_CONTAINER(nbpage), 5); - - opt.dontPing = gtk_check_button_new_with_label("Don't Ping"); - g_signal_connect(GTK_OBJECT(opt.dontPing), "released", - GTK_SIGNAL_FUNC(pingButton_toggled_cb), opt.dontPing); - gtk_table_attach_defaults(GTK_TABLE(nbpage), opt.dontPing, 0, 1, 0, 1); - /* gtk_box_pack_start(GTK_BOX(nbpage), opt.dontPing, FALSE, FALSE, 0); */ - gtk_widget_show(opt.dontPing); - - - frame = gtk_frame_new("Ping Types"); - gtk_table_attach_defaults(GTK_TABLE(nbpage), frame, 0, 3, 1, 4); - /* gtk_box_pack_start(GTK_BOX(nbpage), frame, FALSE, FALSE, 0); */ - - table = gtk_table_new(3, 4, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_table_set_col_spacings(GTK_TABLE(table), 5); - gtk_container_add(GTK_CONTAINER(frame), table); - - - opt.icmpechoPing = gtk_check_button_new_with_label("ICMP Echo"); - g_signal_connect(GTK_OBJECT(opt.icmpechoPing), "released", - GTK_SIGNAL_FUNC(pingButton_toggled_cb), opt.icmpechoPing); - gtk_table_attach_defaults(GTK_TABLE(table), opt.icmpechoPing, 0, 1, 0, 1); - if (opt.isr00t) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt.icmpechoPing), TRUE); - else - gtk_widget_set_sensitive(GTK_WIDGET(opt.icmpechoPing), FALSE); - gtk_widget_show(opt.icmpechoPing); - - - opt.icmptimePing = gtk_check_button_new_with_label("ICMP Timestamp"); - g_signal_connect(GTK_OBJECT(opt.icmptimePing), "released", - GTK_SIGNAL_FUNC(pingButton_toggled_cb), opt.icmptimePing); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.icmptimePing), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.icmptimePing, 0, 1, 1, 2); - gtk_widget_show(opt.icmptimePing); - - - opt.icmpmaskPing = gtk_check_button_new_with_label("ICMP Netmask"); - g_signal_connect(GTK_OBJECT(opt.icmpmaskPing), "released", - GTK_SIGNAL_FUNC(pingButton_toggled_cb), opt.icmpmaskPing); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.icmpmaskPing), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.icmpmaskPing, 0, 1, 2, 3); - gtk_widget_show(opt.icmpmaskPing); - - - opt.tcpPing = gtk_check_button_new_with_label("TCP ACK Ping"); - g_signal_connect(GTK_OBJECT(opt.tcpPing), "released", - GTK_SIGNAL_FUNC(pingButton_toggled_cb), opt.tcpPing); - gtk_table_attach_defaults(GTK_TABLE(table), opt.tcpPing, 1, 2, 0, 1); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt.tcpPing), TRUE); - gtk_widget_show(opt.tcpPing); - - opt.tcpPingLabel = gtk_label_new("Port(s):"); - gtk_table_attach_defaults(GTK_TABLE(table), opt.tcpPingLabel, 2, 3, 0, 1); - gtk_widget_show(opt.tcpPingLabel); - - opt.tcpPingPorts = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.tcpPingPorts), 256); - /*gtk_object_set(GTK_OBJECT(opt.tcpPingPorts), "width", 100, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.tcpPingPorts), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - gtk_table_attach_defaults(GTK_TABLE(table), opt.tcpPingPorts, 3, 4, 0, 1); - gtk_widget_show(opt.tcpPingPorts); - - - opt.synPing = gtk_check_button_new_with_label("TCP SYN Ping"); - g_signal_connect(GTK_OBJECT(opt.synPing), "released", - GTK_SIGNAL_FUNC(pingButton_toggled_cb), opt.synPing); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPing), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.synPing, 1, 2, 1, 2); - gtk_widget_show(opt.synPing); - - opt.synPingLabel = gtk_label_new("Port(s):"); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.synPing)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPingLabel), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.synPingLabel, 2, 3, 1, 2); - gtk_widget_show(opt.synPingLabel); - - opt.synPingPorts = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.synPingPorts), 256); - /*gtk_object_set(GTK_OBJECT(opt.synPingPorts), "width", 100, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.synPingPorts), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.synPing)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPingPorts), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.synPingPorts, 3, 4, 1, 2); - gtk_widget_show(opt.synPingPorts); - - - opt.udpPing = gtk_check_button_new_with_label("UDP Ping"); - g_signal_connect(GTK_OBJECT(opt.udpPing), "released", - GTK_SIGNAL_FUNC(pingButton_toggled_cb), opt.udpPing); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPing), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.udpPing, 1, 2, 2, 3); - gtk_widget_show(opt.udpPing); - - opt.udpPingLabel = gtk_label_new("Port(s):"); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.udpPing)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPingLabel), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.udpPingLabel, 2, 3, 2, 3); - gtk_widget_show(opt.udpPingLabel); - - opt.udpPingPorts = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.udpPingPorts), 256); - /*gtk_object_set(GTK_OBJECT(opt.udpPingPorts), "width", 100, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.udpPingPorts), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.udpPing)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPingPorts), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.udpPingPorts, 3, 4, 2, 3); - gtk_widget_show(opt.udpPingPorts); - - gtk_widget_show(table); - gtk_widget_show(frame); - - gtk_widget_show(nblabel); - gtk_widget_show(nbpage); - - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); - - -/* Timings page (3rd in notebook) */ - nblabel = gtk_label_new("Timing"); - nbpage = gtk_hbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(nbpage), 5); - - - /* Throttling & Timeouts combobox */ - { - gint i; - - frame = gtk_frame_new("Throttling & Timeouts"); - gtk_box_pack_start(GTK_BOX(nbpage), frame, FALSE, FALSE, 0); - - table = gtk_table_new(5, 6, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_table_set_col_spacing(GTK_TABLE(table), 1, 15); - gtk_container_add(GTK_CONTAINER(frame), table); - - opt.throttleType = gtk_combo_box_new_text (); - - for (i = 0; throttleEntries[i]; i++) { - gtk_combo_box_append_text(GTK_COMBO_BOX(opt.throttleType), throttleEntries[i]); - } - - g_signal_connect(G_OBJECT(opt.throttleType), "changed", - G_CALLBACK (throttleType_cb), NULL); - - gtk_table_attach_defaults(GTK_TABLE(table), opt.throttleType, 0, 2, 0, 1); - gtk_widget_show(opt.throttleType); - } - - - opt.ipv4Ttl = gtk_check_button_new_with_label("IPv4 TTL"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.ipv4Ttl), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.ipv4Ttl, 0, 1, 2, 3); - gtk_widget_show(opt.ipv4Ttl); - - adjust = (GtkAdjustment *) gtk_adjustment_new(127.0, 0.0, 255.0, 1.0, 10.0, 10.0); - opt.ipv4TtlValue = gtk_spin_button_new(adjust, 1.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.ipv4TtlValue), TRUE); - g_signal_connect(GTK_OBJECT(opt.ipv4Ttl), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.ipv4TtlValue); - /* gtk_object_set(GTK_OBJECT(opt.ipv4TtlValue), "width", 55, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.ipv4TtlValue), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.ipv4Ttl)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.ipv4TtlValue), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.ipv4TtlValue, 1, 2, 2, 3); - gtk_widget_show(opt.ipv4TtlValue); - - - opt.minPar = gtk_check_button_new_with_label("Min. Parallel"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.minPar), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.minPar, 0, 1, 3, 4); - gtk_widget_show(opt.minPar); - - adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 150.0, 1.0, 10.0, 10.0); - opt.minParSocks = gtk_spin_button_new(adjust, 1.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.minParSocks), TRUE); - /*gtk_object_set(GTK_OBJECT(opt.minParSocks), "width", 55, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.minPar), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.minParSocks); - g_signal_connect(GTK_OBJECT(opt.minParSocks), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.minPar)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.minParSocks), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.minParSocks, 1, 2, 3, 4); - gtk_widget_show(opt.minParSocks); - - - opt.maxPar = gtk_check_button_new_with_label("Max. Parallel"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.maxPar), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.maxPar, 0, 1, 4, 5); - gtk_widget_show(opt.maxPar); - - adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 1500.0, 1.0, 10.0, 10.0); - opt.maxParSocks = gtk_spin_button_new(adjust, 1.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.maxParSocks), TRUE); - /*gtk_object_set(GTK_OBJECT(opt.maxParSocks), "width", 55, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.maxPar), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.maxParSocks); - g_signal_connect(GTK_OBJECT(opt.maxParSocks), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.maxPar)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.maxParSocks), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.maxParSocks, 1, 2, 4, 5); - gtk_widget_show(opt.maxParSocks); - - - opt.startRtt = gtk_check_button_new_with_label("Initial RTT"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.startRtt), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.startRtt, 2, 3, 0, 1); - gtk_widget_show(opt.startRtt); - - adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 0.0, 9999999.0, 10.0, 100.0, 100.0); - opt.startRttTime = gtk_spin_button_new(adjust, 10.0, 0); - /* gtk_object_set(GTK_OBJECT(opt.startRttTime), "width", 75, NULL);*/ - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.startRttTime), TRUE); - g_signal_connect(GTK_OBJECT(opt.startRtt), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.startRttTime); - g_signal_connect(GTK_OBJECT(opt.startRttTime), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.startRtt)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.startRttTime), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.startRttTime, 3, 4, 0, 1); - gtk_widget_show(opt.startRttTime); - - label = gtk_label_new("ms"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), label, 4, 5, 0, 1); - gtk_widget_show(label); - - - opt.minRtt = gtk_check_button_new_with_label("Min. RTT"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.minRtt), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.minRtt, 2, 3, 1, 2); - gtk_widget_show(opt.minRtt); - - adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 1.0, 9999999.0, 10.0, 100.0, 100.0); - opt.minRttTime = gtk_spin_button_new(adjust, 10.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.minRttTime), TRUE); - /*gtk_object_set(GTK_OBJECT(opt.minRttTime), "width", 75, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.minRtt), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.minRttTime); - g_signal_connect(GTK_OBJECT(opt.minRttTime), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.minRtt)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.minRttTime), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.minRttTime, 3, 4, 1, 2); - gtk_widget_show(opt.minRttTime); - - label = gtk_label_new("ms"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), label, 4, 5, 1, 2); - gtk_widget_show(label); - - - opt.maxRtt = gtk_check_button_new_with_label("Max. RTT"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.maxRtt), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.maxRtt, 2, 3, 2, 3); - gtk_widget_show(opt.maxRtt); - - adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 6.0, 9999999.0, 10.0, 100.0, 100.0); - opt.maxRttTime = gtk_spin_button_new(adjust, 10.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.maxRttTime), TRUE); - /*gtk_object_set(GTK_OBJECT(opt.maxRttTime), "width", 75, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.maxRtt), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.maxRttTime); - g_signal_connect(GTK_OBJECT(opt.maxRttTime), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.maxRtt)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.maxRttTime), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.maxRttTime, 3, 4, 2, 3); - gtk_widget_show(opt.maxRttTime); - - label = gtk_label_new("ms"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), label, 4, 5, 2, 3); - gtk_widget_show(label); - - - opt.hostTimeout = gtk_check_button_new_with_label("Host Timeout"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.hostTimeout), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.hostTimeout, 2, 3, 3, 4); - gtk_widget_show(opt.hostTimeout); - - adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 201.0, 9999999.0, 10.0, 100.0, 100.0); - opt.hostTimeoutTime = gtk_spin_button_new(adjust, 10.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.hostTimeoutTime), TRUE); - /*gtk_object_set(GTK_OBJECT(opt.hostTimeoutTime), "width", 75, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.hostTimeout), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.hostTimeoutTime); - g_signal_connect(GTK_OBJECT(opt.hostTimeoutTime), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.hostTimeout)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.hostTimeoutTime), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.hostTimeoutTime, 3, 4, 3, 4); - gtk_widget_show(opt.hostTimeoutTime); - - label = gtk_label_new("ms"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), label, 4, 5, 3, 4); - gtk_widget_show(label); - - - opt.scanDelay = gtk_check_button_new_with_label("Scan Delay"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanDelay), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.scanDelay, 2, 3, 4, 5); - gtk_widget_show(opt.scanDelay); - - adjust = (GtkAdjustment *) gtk_adjustment_new(6000.0, 1.0, 9999999.0, 10.0, 100.0, 100.0); - opt.scanDelayTime = gtk_spin_button_new(adjust, 10.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.scanDelayTime), TRUE); - /*gtk_object_set(GTK_OBJECT(opt.scanDelayTime), "width", 75, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.scanDelay), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.scanDelayTime); - g_signal_connect(GTK_OBJECT(opt.scanDelayTime), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if ((!opt.isr00t) || (! GTK_TOGGLE_BUTTON(opt.scanDelay)->active)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanDelayTime), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.scanDelayTime, 3, 4, 4, 5); - gtk_widget_show(opt.scanDelayTime); - - label = gtk_label_new("ms"); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), label, 4, 5, 4, 5); - gtk_widget_show(label); - - - gtk_widget_show(table); - gtk_widget_show(frame); - - gtk_widget_show(nblabel); - gtk_widget_show(nbpage); - - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); - - -/* Files page (4th in notebook) */ - nblabel = gtk_label_new("Files"); - nbpage = gtk_hbox_new(TRUE, 5); - gtk_container_set_border_width(GTK_CONTAINER(nbpage), 5); - /* gtk_table_set_col_spacings(GTK_TABLE(nbpage), 5); */ - - frame = gtk_frame_new("Input File"); - gtk_box_pack_start(GTK_BOX(nbpage), frame, TRUE, TRUE, 0); - - table = gtk_table_new(5, 5, TRUE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_table_set_col_spacing(GTK_TABLE(table), 1, 15); - gtk_container_add(GTK_CONTAINER(frame), table); - - - opt.useInputFile = gtk_check_button_new_with_label("Input File"); - g_signal_connect(GTK_OBJECT(opt.useInputFile), "released", - GTK_SIGNAL_FUNC(validate_file_change), NULL); - gtk_table_attach_defaults(GTK_TABLE(table), opt.useInputFile, 0, 2, 0, 1); - gtk_widget_show(opt.useInputFile); - - opt.inputFilename = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.inputFilename), 256); - /* gtk_object_set(GTK_OBJECT(opt.inputFilename), "width", 110, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.inputFilename), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - gtk_widget_set_sensitive(GTK_WIDGET(opt.inputFilename), - GTK_TOGGLE_BUTTON(opt.useInputFile)->active); - gtk_table_attach_defaults(GTK_TABLE(table), opt.inputFilename, 0, 4, 2, 3); - gtk_widget_show(opt.inputFilename); - - opt.inputBrowse = gtk_button_new_with_label("Browse"); - g_signal_connect(GTK_OBJECT(opt.inputBrowse), "pressed", - GTK_SIGNAL_FUNC(browseButton_pressed_cb), opt.inputFilename); - gtk_widget_set_sensitive(GTK_WIDGET(opt.inputBrowse), - GTK_TOGGLE_BUTTON(opt.useInputFile)->active); - gtk_table_attach_defaults(GTK_TABLE(table), opt.inputBrowse, 4, 5, 2, 3); - gtk_widget_show(opt.inputBrowse); - - gtk_widget_show(table); - gtk_widget_show(frame); - - - frame = gtk_frame_new("Output File"); - gtk_box_pack_end(GTK_BOX(nbpage), frame, TRUE, TRUE, 0); - - table = gtk_table_new(5, 5, TRUE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_table_set_col_spacing(GTK_TABLE(table), 1, 15); - gtk_container_add(GTK_CONTAINER(frame), table); - - - opt.useOutputFile = gtk_check_button_new_with_label("Output File"); - g_signal_connect(GTK_OBJECT(opt.useOutputFile), "released", - GTK_SIGNAL_FUNC(validate_file_change), NULL); - gtk_table_attach_defaults(GTK_TABLE(table), opt.useOutputFile, 0, 2, 0, 1); - gtk_widget_show(opt.useOutputFile); - - opt.outputFilename = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.outputFilename), 256); - /*gtk_object_set(GTK_OBJECT(opt.outputFilename), "width", 110, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.outputFilename), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFilename), - GTK_TOGGLE_BUTTON(opt.useOutputFile)->active); - gtk_table_attach_defaults(GTK_TABLE(table), opt.outputFilename, 0, 4, 2, 3); - gtk_widget_show(opt.outputFilename); - - opt.outputBrowse = gtk_button_new_with_label("Browse"); - g_signal_connect(GTK_OBJECT(opt.outputBrowse), "pressed", - GTK_SIGNAL_FUNC(browseButton_pressed_cb), opt.outputFilename); - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputBrowse), - GTK_TOGGLE_BUTTON(opt.useOutputFile)->active); - gtk_table_attach_defaults(GTK_TABLE(table), opt.outputBrowse, 4, 5, 2, 3); - gtk_widget_show(opt.outputBrowse); - - - { - GtkTreeIter iter; - GtkListStore *store; - GtkCellRenderer *renderer; - gint i; - - opt.outputFormatLabel = gtk_label_new("Output Format:"); - gtk_label_set_justify(GTK_LABEL(opt.outputFormatLabel), GTK_JUSTIFY_LEFT); - gtk_table_attach_defaults(GTK_TABLE(table), opt.outputFormatLabel, 0, 2, 3, 4); - gtk_widget_show(opt.outputFormatLabel); - - store = gtk_list_store_new (1, G_TYPE_STRING); - - for (i = 0; i < G_N_ELEMENTS(outputFormatEntries); i++ ) { - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, - 0, outputFormatEntries[i], - -1); - } - - opt.outputFormatType = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store)); - - g_object_unref(store); - -#if GTK_CHECK_VERSION(2,6,0) - gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (opt.outputFormatType), - is_separator, NULL, NULL); -#endif - - renderer = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start ( - GTK_CELL_LAYOUT (opt.outputFormatType), renderer, TRUE); - gtk_cell_layout_set_attributes ( - GTK_CELL_LAYOUT (opt.outputFormatType), renderer, - "text", 0, - NULL); - g_object_unref(renderer); - - g_signal_connect(G_OBJECT(opt.outputFormatType), "changed", - G_CALLBACK (outputFormatType_cb), NULL); - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFormatType), - GTK_TOGGLE_BUTTON(opt.useOutputFile)->active); - gtk_table_attach_defaults(GTK_TABLE(table), opt.outputFormatType, 2, 4, 3, 4); - gtk_widget_show(opt.outputFormatType); - } - - opt.outputAppend = gtk_check_button_new_with_label("Append to File"); - gtk_table_attach_defaults(GTK_TABLE(table), opt.outputAppend, 0, 3, 4, 5); - gtk_widget_show(opt.outputAppend); - - - - gtk_widget_show(table); - gtk_widget_show(frame); - - - gtk_widget_show(nblabel); - gtk_widget_show(nbpage); - - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); - - -/* Option page (5th in notebook) */ - nblabel = gtk_label_new("Options"); - nbpage = gtk_table_new(2, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(nbpage), 5); - gtk_table_set_col_spacings(GTK_TABLE(nbpage), 5); - - /* Reverse DNS Resolution frame */ - { - gint i; - - frame = gtk_frame_new("Reverse DNS Resolution"); - gtk_table_attach_defaults(GTK_TABLE(nbpage), frame, 0, 1, 0, 1); - - vbox = gtk_vbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); - gtk_container_add(GTK_CONTAINER(frame), vbox); - - opt.resolveType = gtk_combo_box_new_text(); - - for (i = 0; resolveEntries[i]; i++) { - gtk_combo_box_append_text(GTK_COMBO_BOX(opt.resolveType), resolveEntries[i]); - } - - g_signal_connect(G_OBJECT(opt.resolveType), "changed", - G_CALLBACK (resolveType_cb), NULL); - - gtk_box_pack_start(GTK_BOX(vbox), opt.resolveType, TRUE, FALSE, 0); - gtk_widget_show_all(frame); - } - - /* Verbosity & Debugging frame */ - frame = gtk_frame_new("Verbosity & Debugging Levels"); - gtk_table_attach_defaults(GTK_TABLE(nbpage), frame, 0, 1, 1, 2); - - table = gtk_table_new(2, 2, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - gtk_container_add(GTK_CONTAINER(frame), table); - - opt.verbose = gtk_check_button_new_with_label("Verbosity"); - gtk_table_attach_defaults(GTK_TABLE(table), opt.verbose, 0, 1, 0, 1); - gtk_widget_show(opt.verbose); - - adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 2.0, 1.0, 10.0, 10.0); - opt.verboseValue = gtk_spin_button_new(adjust, 1.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.verboseValue), TRUE); - g_signal_connect(GTK_OBJECT(opt.verbose), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.verboseValue); - g_signal_connect(GTK_OBJECT(opt.verboseValue), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (!GTK_TOGGLE_BUTTON(opt.verbose)->active) - gtk_widget_set_sensitive(GTK_WIDGET(opt.verboseValue), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.verboseValue, 1, 2, 0, 1); - gtk_widget_show(opt.verboseValue); - - opt.debug = gtk_check_button_new_with_label("Debugging"); - gtk_table_attach_defaults(GTK_TABLE(table), opt.debug, 0, 1, 1, 2); - gtk_widget_show(opt.debug); - - adjust = (GtkAdjustment *) gtk_adjustment_new(1.0, 1.0, 9.0, 1.0, 10.0, 10.0); - opt.debugValue = gtk_spin_button_new(adjust, 1.0, 0); - gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(opt.debugValue), TRUE); - g_signal_connect(GTK_OBJECT(opt.debug), "released", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.debugValue); - g_signal_connect(GTK_OBJECT(opt.debugValue), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (!GTK_TOGGLE_BUTTON(opt.debug)->active) - gtk_widget_set_sensitive(GTK_WIDGET(opt.debugValue), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.debugValue, 1, 2, 1, 2); - gtk_widget_show(opt.debugValue); - - gtk_widget_show(table); - gtk_widget_show(frame); - - - frame = gtk_frame_new("Source"); - gtk_table_attach_defaults(GTK_TABLE(nbpage), frame, 1, 2, 0, 2); - - table = gtk_table_new(4, 2, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(table), 5); - /* gtk_table_set_col_spacings(GTK_TABLE(table), 5); */ - gtk_container_add(GTK_CONTAINER(frame), table); - - opt.useSourceDevice = gtk_check_button_new_with_label("Device"); - g_signal_connect(GTK_OBJECT(opt.useSourceDevice), "toggled", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useSourceDevice), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.useSourceDevice, 0, 1, 0, 1); - gtk_widget_show(opt.useSourceDevice); - - opt.SourceDevice = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.SourceDevice), 64); - /*gtk_object_set(GTK_OBJECT(opt.SourceDevice), "width", 110, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.useSourceDevice), "toggled", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourceDevice); - g_signal_connect(GTK_OBJECT(opt.SourceDevice), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (!GTK_TOGGLE_BUTTON(opt.useSourceDevice)->active) - gtk_widget_set_sensitive(GTK_WIDGET(opt.SourceDevice), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.SourceDevice, 1, 2, 0, 1); - gtk_widget_show(opt.SourceDevice); - - - opt.useSourcePort = gtk_check_button_new_with_label("Port"); - g_signal_connect(GTK_OBJECT(opt.useSourcePort), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useSourcePort), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.useSourcePort, 0, 1, 1, 2); - gtk_widget_show(opt.useSourcePort); - - opt.SourcePort = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.SourcePort), 64); - /*gtk_object_set(GTK_OBJECT(opt.SourcePort), "width", 110, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.useSourcePort), "toggled", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourcePort); - g_signal_connect(GTK_OBJECT(opt.SourcePort), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (!GTK_TOGGLE_BUTTON(opt.useSourcePort)->active) - gtk_widget_set_sensitive(GTK_WIDGET(opt.SourcePort), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.SourcePort, 1, 2, 1, 2); - gtk_widget_show(opt.SourcePort); - - - opt.useSourceIP = gtk_check_button_new_with_label("IP"); - g_signal_connect(GTK_OBJECT(opt.useSourceIP), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useSourceIP), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.useSourceIP, 0, 1, 2, 3); - gtk_widget_show(opt.useSourceIP); - - opt.SourceIP = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.SourceIP), 64); - /*gtk_object_set(GTK_OBJECT(opt.SourceIP), "width", 110, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.useSourceIP), "toggled", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.SourceIP); - g_signal_connect(GTK_OBJECT(opt.SourceIP), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (!GTK_TOGGLE_BUTTON(opt.useSourceIP)->active) - gtk_widget_set_sensitive(GTK_WIDGET(opt.SourceIP), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.SourceIP, 1, 2, 2, 3); - gtk_widget_show(opt.SourceIP); - - - opt.useDecoy = gtk_check_button_new_with_label("Decoy"); - g_signal_connect(GTK_OBJECT(opt.useDecoy), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useDecoy), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.useDecoy, 0, 1, 3, 4); - gtk_widget_show(opt.useDecoy); - - opt.Decoy = gtk_entry_new(); - gtk_entry_set_max_length(GTK_ENTRY(opt.Decoy), 256); - /*gtk_object_set(GTK_OBJECT(opt.Decoy), "width", 110, NULL);*/ - g_signal_connect(GTK_OBJECT(opt.useDecoy), "toggled", - GTK_SIGNAL_FUNC(toggle_button_set_sensitive_cb), opt.Decoy); - g_signal_connect(GTK_OBJECT(opt.Decoy), "changed", - GTK_SIGNAL_FUNC(display_nmap_command_cb), NULL); - if (!GTK_TOGGLE_BUTTON(opt.useDecoy)->active) - gtk_widget_set_sensitive(GTK_WIDGET(opt.Decoy), FALSE); - gtk_table_attach_defaults(GTK_TABLE(table), opt.Decoy, 1, 2, 3, 4); - gtk_widget_show(opt.Decoy); - - - gtk_widget_show(table); - gtk_widget_show(frame); - - - frame = gtk_frame_new("Misc. Options"); - gtk_table_attach_defaults(GTK_TABLE(nbpage), frame, 2, 3, 0, 2); - - vbox = gtk_vbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); - gtk_container_add(GTK_CONTAINER(frame), vbox); - - opt.useFragments = gtk_check_button_new_with_label("Fragmentation"); - g_signal_connect(GTK_OBJECT(opt.useFragments), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useFragments), FALSE); - gtk_box_pack_start(GTK_BOX(vbox), opt.useFragments, FALSE, TRUE, 0); - gtk_widget_show(opt.useFragments); - - - opt.useIPv6 = gtk_check_button_new_with_label("IPv6"); - g_signal_connect(GTK_OBJECT(opt.useIPv6), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - if (!opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useIPv6), FALSE); - gtk_box_pack_start(GTK_BOX(vbox), opt.useIPv6, FALSE, TRUE, 0); - gtk_widget_show(opt.useIPv6); - - - opt.useOrderedPorts = gtk_check_button_new_with_label("Ordered Ports"); - g_signal_connect(GTK_OBJECT(opt.useOrderedPorts), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - gtk_box_pack_start(GTK_BOX(vbox), opt.useOrderedPorts, FALSE, TRUE, 0); - gtk_widget_show(opt.useOrderedPorts); - - opt.randomizeHosts = gtk_check_button_new_with_label("Randomize Host Order"); - g_signal_connect(GTK_OBJECT(opt.randomizeHosts), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - gtk_box_pack_start(GTK_BOX(vbox), opt.randomizeHosts, FALSE, TRUE, 0); - gtk_widget_show(opt.randomizeHosts); - - opt.packetTrace = gtk_check_button_new_with_label("Packet Trace"); - g_signal_connect(GTK_OBJECT(opt.packetTrace), "released", - GTK_SIGNAL_FUNC(validate_option_change), NULL); - gtk_box_pack_start(GTK_BOX(vbox), opt.packetTrace, FALSE, TRUE, 0); - gtk_widget_show(opt.packetTrace); - - gtk_widget_show(vbox); - gtk_widget_show(frame); - - - gtk_widget_show(nblabel); - gtk_widget_show(nbpage); - - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), GTK_WIDGET(nbpage), GTK_WIDGET(nblabel)); - - gtk_box_pack_start(GTK_BOX(main_vbox), notebook, FALSE, TRUE, 5); - gtk_widget_show(notebook); - - - /* output box (variable; below notebook) */ - hbox = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(main_vbox), hbox, TRUE, TRUE, 5); - - /* text widget with scroll bar */ - { - GtkWidget *sw; - GtkWidget *view; - - sw = gtk_scrolled_window_new(NULL, NULL); - gtk_box_pack_start(GTK_BOX(main_vbox), sw, TRUE, TRUE, 5); - - view = gtk_text_view_new(); - opt.buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view)); - - /* Create tag definitions for text coloring */ - gtk_text_buffer_create_tag(opt.buffer, "normal", - "family", "monospace", NULL); - gtk_text_buffer_create_tag(opt.buffer, "bold", - "family", "monospace", - "weight", PANGO_WEIGHT_BOLD, NULL); - gtk_text_buffer_create_tag(opt.buffer, "red", - "family", "monospace", - "weight", PANGO_WEIGHT_BOLD, - "foreground", "red", NULL); - gtk_text_buffer_create_tag(opt.buffer, "blue", - "family", "monospace", - "weight", PANGO_WEIGHT_BOLD, - "foreground", "blue", NULL); - gtk_text_buffer_create_tag(opt.buffer, "green", - "family", "monospace", - "weight", PANGO_WEIGHT_BOLD, - "foreground", "green", NULL); - - gtk_container_add(GTK_CONTAINER(sw), view); - gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD); - gtk_widget_set_size_request(view, 500, 248); - gtk_widget_show(view); - gtk_widget_realize(view); - - gtk_widget_show(sw); - } - - -/* status hbox at bottom */ - hbox = gtk_hbox_new(FALSE, 5); - gtk_container_set_border_width(GTK_CONTAINER(hbox), 5); - gtk_box_pack_end(GTK_BOX(main_vbox), hbox, FALSE, FALSE, 5); - -/* label and line in status box */ - label = gtk_label_new("Command:"); - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - gtk_widget_show(label); - - opt.commandEntry = gtk_entry_new(); - gtk_editable_set_editable(GTK_EDITABLE(opt.commandEntry), FALSE); - gtk_box_pack_start(GTK_BOX(hbox), opt.commandEntry, TRUE, TRUE, 0); - gtk_widget_show(opt.commandEntry); - - gtk_widget_show(hbox); - - gtk_widget_show(main_vbox); - - /* Set default values here because now we can be sure that all the - * widgets have been created. - */ - /* First Notebook - Scan */ - gtk_combo_box_set_active(GTK_COMBO_BOX (opt.scanType), 0); - gtk_combo_box_set_active(GTK_COMBO_BOX (opt.protportType), opt.protportValue); - /* Third Notebook - Timing */ - gtk_combo_box_set_active(GTK_COMBO_BOX (opt.throttleType), opt.throttleValue); - /* Fourth Notebook - Files */ - gtk_combo_box_set_active(GTK_COMBO_BOX (opt.outputFormatType), opt.outputFormatValue); - /* Fifth Notebook - Options */ - gtk_combo_box_set_active(GTK_COMBO_BOX (opt.resolveType), opt.resolveValue); - - display_nmap_command(); - - return main_win; -} - -GtkWidget* create_fileSelection(const char *title, char *filename, void (*action)(), GtkEntry *entry) -{ -GtkWidget *selector = gtk_file_selection_new((title) ? title : "Select File"); - - if (filename) { - if (*filename) - gtk_file_selection_set_filename(GTK_FILE_SELECTION(selector), filename); - g_object_set_data(G_OBJECT(selector), "NmapFE_filename", filename); -} - if (action) - g_object_set_data(G_OBJECT(selector), "NmapFE_action", action); - if (entry) - g_object_set_data(G_OBJECT(selector), "NmapFE_entry", entry); - - g_signal_connect_swapped(GTK_OBJECT(GTK_FILE_SELECTION(selector)->ok_button), - "clicked", GTK_SIGNAL_FUNC(okButton_clicked_cb), - (gpointer) selector); - - g_signal_connect_swapped(GTK_OBJECT(GTK_FILE_SELECTION(selector)->ok_button), - "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer) selector); - - g_signal_connect_swapped(GTK_OBJECT(GTK_FILE_SELECTION(selector)->cancel_button), - "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer) selector); - - return(selector); -} - - -GtkWidget* create_helpDialog() -{ -GtkWidget *helpDialog; -GtkWidget *vbox; -GtkWidget *notebook; -GtkWidget *text; -GtkWidget *label; - - helpDialog = gtk_dialog_new_with_buttons("Help With NmapFE", - NULL, - GTK_DIALOG_MODAL, - GTK_STOCK_OK, - GTK_RESPONSE_NONE, - NULL); - - - g_signal_connect_swapped (helpDialog, - "response", - G_CALLBACK (gtk_widget_destroy), - helpDialog); - - gtk_widget_set_size_request(helpDialog, 400, 300); - gtk_window_set_position(GTK_WINDOW(helpDialog), GTK_WIN_POS_CENTER); - - vbox = GTK_DIALOG(helpDialog)->vbox; - - notebook = gtk_notebook_new(); - gtk_widget_show(notebook); - gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0); - - label = gtk_label_new("Scanning"); - text = gtk_label_new("Starting a scan:\n" - "1) Put the host(s) name(s) of which to scan in the \"Targets\" text box.\n" - "2) Pick the scan options you would like\n" - "3) Pick the view you want from the 'View' menu option.\n" - "4) Click the 'Scan' button\n" - "\n" - "Stopping a Scan:\n" - "After clicking 'Scan', the button will remain depressed. \n" - "If you would like to stop the scan, simply click that button again.\n" - "The button will pop up, and the scan will be stopped.\n"); - gtk_label_set_justify(GTK_LABEL(text), GTK_JUSTIFY_LEFT); - - gtk_widget_show(label); - gtk_widget_show(text); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), text, label); - - label = gtk_label_new("Logging"); - text = gtk_label_new("To log a scan in human-readable form:\n" - "1) After finishing a scan, click 'Save Log' from the 'File' menu.\n" - "\n" - "To re-open a human-readable log:\n" - "1) Click 'Open Log' from the 'File' menu.\n" - "2) If you have color coding enabled, the log will be opened in \n" - "color. If not, it will be opened in plain text."); - gtk_label_set_justify(GTK_LABEL(text), GTK_JUSTIFY_LEFT); - - gtk_widget_show(label); - gtk_widget_show(text); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), text, label); - - label = gtk_label_new("Colors"); - text = gtk_label_new("Bold Red - Services that would allow execution of commands\n" - "and/or logging directly into the system. Telnet, FTP, rsh, ssh,\n" - "etc... are covered by this. Not *every* single service is covered,\n" - "the code base would be huge if they were.\n" - "\n" - "Bold Blue - Mail services. IMAP, SMTP, POP3, etc... \n" - "Once again, not all are covered, just the common ones.\n" - "\n" - "Bold Black - Services users could get information from.\n" - "finger, http, X11, etc...\n" - "\n" - "Regular Black - Services I had nothing better to do with :)"); - /* - "\n" - "\n" - "If you have ideas on how to color code more, please let me know:\n" - "key@aye.net"); - */ - gtk_label_set_justify(GTK_LABEL(text), GTK_JUSTIFY_LEFT); - - gtk_widget_show(label); - gtk_widget_show(text); - gtk_notebook_append_page(GTK_NOTEBOOK(notebook), text, label); - - gtk_widget_show(notebook); - - return(helpDialog); -} - - -#endif /* MISSING_GTK */ diff --git a/nmapfe/nmapfe.dsw b/nmapfe/nmapfe.dsw deleted file mode 100644 index 5c74f1861..000000000 --- a/nmapfe/nmapfe.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "NmapFE"=".\NmapFE.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/nmapfe/nmapfe.h b/nmapfe/nmapfe.h deleted file mode 100644 index f9136ffd1..000000000 --- a/nmapfe/nmapfe.h +++ /dev/null @@ -1,310 +0,0 @@ - -/*************************************************************************** - * nmapfe.c -- Handles widget placement for drawing the main NmapFE GUI * - * interface. * - * * - ***********************IMPORTANT NMAP LICENSE TERMS************************ - * * - * The Nmap Security Scanner is (C) 1996-2006 Insecure.Com LLC. Nmap is * - * also a registered trademark of Insecure.Com LLC. This program is free * - * software; you may redistribute and/or modify it under the terms of the * - * GNU General Public License as published by the Free Software * - * Foundation; Version 2 with the clarifications and exceptions described * - * below. This guarantees your right to use, modify, and redistribute * - * this software under certain conditions. If you wish to embed Nmap * - * technology into proprietary software, we sell alternative licenses * - * (contact sales@insecure.com). Dozens of software vendors already * - * license Nmap technology such as host discovery, port scanning, OS * - * detection, and version detection. * - * * - * Note that the GPL places important restrictions on "derived works", yet * - * it does not provide a detailed definition of that term. To avoid * - * misunderstandings, we consider an application to constitute a * - * "derivative work" for the purpose of this license if it does any of the * - * following: * - * o Integrates source code from Nmap * - * o Reads or includes Nmap copyrighted data files, such as * - * nmap-os-fingerprints or nmap-service-probes. * - * o Executes Nmap and parses the results (as opposed to typical shell or * - * execution-menu apps, which simply display raw Nmap output and so are * - * not derivative works.) * - * o Integrates/includes/aggregates Nmap into a proprietary executable * - * installer, such as those produced by InstallShield. * - * o Links to a library or executes a program that does any of the above * - * * - * The term "Nmap" should be taken to also include any portions or derived * - * works of Nmap. This list is not exclusive, but is just meant to * - * clarify our interpretation of derived works with some common examples. * - * These restrictions only apply when you actually redistribute Nmap. For * - * example, nothing stops you from writing and selling a proprietary * - * front-end to Nmap. Just distribute it by itself, and point people to * - * http://insecure.org/nmap/ to download Nmap. * - * * - * We don't consider these to be added restrictions on top of the GPL, but * - * just a clarification of how we interpret "derived works" as it applies * - * to our GPL-licensed Nmap product. This is similar to the way Linus * - * Torvalds has announced his interpretation of how "derived works" * - * applies to Linux kernel modules. Our interpretation refers only to * - * Nmap - we don't speak for any other GPL products. * - * * - * If you have any questions about the GPL licensing restrictions on using * - * Nmap in non-GPL works, we would be happy to help. As mentioned above, * - * we also offer alternative license to integrate Nmap into proprietary * - * applications and appliances. These contracts have been sold to dozens * - * of software vendors, and generally include a perpetual license as well * - * as providing for priority support and updates as well as helping to * - * fund the continued development of Nmap technology. Please email * - * sales@insecure.com for further information. * - * * - * As a special exception to the GPL terms, Insecure.Com LLC grants * - * permission to link the code of this program with any version of the * - * OpenSSL library which is distributed under a license identical to that * - * listed in the included Copying.OpenSSL file, and distribute linked * - * combinations including the two. You must obey the GNU GPL in all * - * respects for all of the code used other than OpenSSL. If you modify * - * this file, you may extend this exception to your version of the file, * - * but you are not obligated to do so. * - * * - * If you received these files with a written license agreement or * - * contract stating terms other than the terms above, then that * - * alternative license agreement takes precedence over these comments. * - * * - * Source is provided to this software because we believe users have a * - * right to know exactly what a program is going to do before they run it. * - * This also allows you to audit the software for security holes (none * - * have been found so far). * - * * - * Source code also allows you to port Nmap to new platforms, fix bugs, * - * and add new features. You are highly encouraged to send your changes * - * to fyodor@insecure.org for possible incorporation into the main * - * distribution. By sending these changes to Fyodor or one the * - * Insecure.Org development mailing lists, it is assumed that you are * - * offering Fyodor and Insecure.Com LLC the unlimited, non-exclusive right * - * to reuse, modify, and relicense the code. Nmap will always be * - * available Open Source, but this is important because the inability to * - * relicense code has caused devastating problems for other Free Software * - * projects (such as KDE and NASM). We also occasionally relicense the * - * code to third parties as discussed above. If you wish to specify * - * special license conditions of your contributions, just say so when you * - * send them. * - * * - * This program is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * General Public License for more details at * - * http://www.gnu.org/copyleft/gpl.html , or in the COPYING file included * - * with Nmap. * - * * - ***************************************************************************/ - -/* $Id$ */ - -/* Original Author: Zach - * Mail: key@aye.net - * IRC: EFNet as zach` or key in #bastards or #neatoelito - * AIM (Aol): GoldMatrix - * - * Change the source as you wish, but leave these comments.. - * - * Long live Aol and pr: Phreak. - */ - -#ifndef NMAPFE_H -#define NMAPFE_H - -#if MISSING_GTK -#error "Your system does not appear to have GTK (www.gtk.org) installed. Thus the Nmap X Front End will not compile. You should still be able to use Nmap the normal way (via text console). GUIs are for wimps anyway :)" -#endif - -#include -#include - -/* #define DEBUG(str) { fprintf(stderr, str); fflush(stderr); } */ - -typedef struct { - gchar *scan; - gint scantype; - gboolean rootonly; -} Entry; - - -/* main menu entries */ -enum { - NO_MENU, - SEP_MENU, - FILE_MENU = 100, - FILEOPEN_MENU, - FILESAVE_MENU, - FILEQUIT_MENU, - VIEW_MENU = 300, - VIEWMONO_MENU, - VIEWCOLOR_MENU, - VIEWAPPEND_MENU, - HELP_MENU = 400, - HELPHELP_MENU, - HELPVERSION_MENU, - HELPABOUT_MENU, -}; - - -/* define this > 0 to be able to use the comfortable callback */ -#define SCAN_OFFSET 1 - -/* scan types: used as actions in a factory-generated menu */ -enum { - NO_SCAN, - CONNECT_SCAN = SCAN_OFFSET, - SYN_SCAN, - PING_SCAN, - UDP_SCAN, - FIN_SCAN, - XMAS_SCAN, - MAIMON_SCAN, - NULL_SCAN, - ACK_SCAN, - WIN_SCAN, - PROT_SCAN, - LIST_SCAN, - IDLE_SCAN, - BOUNCE_SCAN -}; - - -/* Throttle types */ -enum { - PARANOID_THROTTLE, - SNEAKY_THROTTLE, - POLITE_THROTTLE, - NORMAL_THROTTLE, - AGRESSIVE_THROTTLE, - INSANE_THROTTLE, - NO_THROTTLE -}; - -/* Reverse resolving options */ -enum { - ALWAYS_RESOLVE, - DEFAULT_RESOLVE, - NEVER_RESOLVE, - NO_RESOLVE -}; - -/* scanning mode (which ports/protocols) options */ -enum { - DEFAULT_PROTPORT, - ALL_PROTPORT, - FAST_PROTPORT, - GIVEN_PROTPORT, - NO_PROTPORT -}; - -/* output format options */ -enum { - NORMAL_OUTPUT, - GREP_OUTPUT, - XML_OUTPUT, - ALL_OUTPUT, -#if GTK_CHECK_VERSION(2,6,0) - SEPARATOR, -#endif - SKIDS_OUTPUT -}; - - -struct NmapFEoptions { - GtkWidget *scanButton; - GtkTextBuffer *buffer; - GtkWidget *targetHost; - GtkWidget *commandEntry; - gboolean appendLog; - guint viewValue; - gboolean isr00t; - /* scan types */ - GtkWidget *scanType; - guint scanValue; - GtkWidget *scanRelayLabel; - GtkWidget *scanRelay; - /* Port/Protocol options */ - GtkWidget *protportFrame; - GtkWidget *protportLabel; - GtkWidget *protportRange; - GtkWidget *protportType; - guint protportValue; - /* optional scan extensions */ - GtkWidget *RPCInfo; - GtkWidget *OSInfo; - GtkWidget *VersionInfo; - /* ping types */ - GtkWidget *dontPing; - GtkWidget *icmpechoPing; - GtkWidget *icmptimePing; - GtkWidget *icmpmaskPing; - GtkWidget *tcpPing; - GtkWidget *tcpPingLabel; - GtkWidget *tcpPingPorts; - GtkWidget *synPing; - GtkWidget *synPingLabel; - GtkWidget *synPingPorts; - GtkWidget *udpPing; - GtkWidget *udpPingLabel; - GtkWidget *udpPingPorts; - /* timing_options */ - GtkWidget *throttleType; - guint throttleValue; - GtkWidget *startRtt; - GtkWidget *startRttTime; - GtkWidget *minRtt; - GtkWidget *minRttTime; - GtkWidget *maxRtt; - GtkWidget *maxRttTime; - GtkWidget *hostTimeout; - GtkWidget *hostTimeoutTime; - GtkWidget *scanDelay; - GtkWidget *scanDelayTime; - GtkWidget *ipv4Ttl; - GtkWidget *ipv4TtlValue; - GtkWidget *minPar; - GtkWidget *minParSocks; - GtkWidget *maxPar; - GtkWidget *maxParSocks; - /* file options */ - GtkWidget *useInputFile; - GtkWidget *inputFilename; - GtkWidget *inputBrowse; - GtkWidget *useOutputFile; - GtkWidget *outputFilename; - GtkWidget *outputBrowse; - GtkWidget *outputFormatLabel; - GtkWidget *outputFormatType; - GtkWidget *outputAppend; - guint outputFormatValue; - /* DNS options */ - GtkWidget *resolveType; - guint resolveValue; - /* verbosity/debugging options */ - GtkWidget *verbose; - GtkWidget *verboseValue; - GtkWidget *debug; - GtkWidget *debugValue; - /* source options */ - GtkWidget *useSourceDevice; - GtkWidget *SourceDevice; - GtkWidget *useSourcePort; - GtkWidget *SourcePort; - GtkWidget *useSourceIP; - GtkWidget *SourceIP; - GtkWidget *useDecoy; - GtkWidget *Decoy; - /* misc. options */ - GtkWidget *useFragments; - GtkWidget *useIPv6; - GtkWidget *useOrderedPorts; - GtkWidget *randomizeHosts; - GtkWidget *packetTrace; -}; - -GtkWidget* create_main_win (void); -GtkWidget* create_fileSelection(const char *title, char *filename, void (*action)(), GtkEntry *entry); -GtkWidget* create_helpDialog(void); - -#endif /* NMAPFE_H */ diff --git a/nmapfe/nmapfe_error.c b/nmapfe/nmapfe_error.c deleted file mode 100644 index f5c2d5835..000000000 --- a/nmapfe/nmapfe_error.c +++ /dev/null @@ -1,150 +0,0 @@ - -/*************************************************************************** - * nmapfe_error.c -- Some simpilar error handling routines. Similar to * - * those used in Nmap. * - * * - ***********************IMPORTANT NMAP LICENSE TERMS************************ - * * - * The Nmap Security Scanner is (C) 1996-2006 Insecure.Com LLC. Nmap is * - * also a registered trademark of Insecure.Com LLC. This program is free * - * software; you may redistribute and/or modify it under the terms of the * - * GNU General Public License as published by the Free Software * - * Foundation; Version 2 with the clarifications and exceptions described * - * below. This guarantees your right to use, modify, and redistribute * - * this software under certain conditions. If you wish to embed Nmap * - * technology into proprietary software, we sell alternative licenses * - * (contact sales@insecure.com). Dozens of software vendors already * - * license Nmap technology such as host discovery, port scanning, OS * - * detection, and version detection. * - * * - * Note that the GPL places important restrictions on "derived works", yet * - * it does not provide a detailed definition of that term. To avoid * - * misunderstandings, we consider an application to constitute a * - * "derivative work" for the purpose of this license if it does any of the * - * following: * - * o Integrates source code from Nmap * - * o Reads or includes Nmap copyrighted data files, such as * - * nmap-os-fingerprints or nmap-service-probes. * - * o Executes Nmap and parses the results (as opposed to typical shell or * - * execution-menu apps, which simply display raw Nmap output and so are * - * not derivative works.) * - * o Integrates/includes/aggregates Nmap into a proprietary executable * - * installer, such as those produced by InstallShield. * - * o Links to a library or executes a program that does any of the above * - * * - * The term "Nmap" should be taken to also include any portions or derived * - * works of Nmap. This list is not exclusive, but is just meant to * - * clarify our interpretation of derived works with some common examples. * - * These restrictions only apply when you actually redistribute Nmap. For * - * example, nothing stops you from writing and selling a proprietary * - * front-end to Nmap. Just distribute it by itself, and point people to * - * http://insecure.org/nmap/ to download Nmap. * - * * - * We don't consider these to be added restrictions on top of the GPL, but * - * just a clarification of how we interpret "derived works" as it applies * - * to our GPL-licensed Nmap product. This is similar to the way Linus * - * Torvalds has announced his interpretation of how "derived works" * - * applies to Linux kernel modules. Our interpretation refers only to * - * Nmap - we don't speak for any other GPL products. * - * * - * If you have any questions about the GPL licensing restrictions on using * - * Nmap in non-GPL works, we would be happy to help. As mentioned above, * - * we also offer alternative license to integrate Nmap into proprietary * - * applications and appliances. These contracts have been sold to dozens * - * of software vendors, and generally include a perpetual license as well * - * as providing for priority support and updates as well as helping to * - * fund the continued development of Nmap technology. Please email * - * sales@insecure.com for further information. * - * * - * As a special exception to the GPL terms, Insecure.Com LLC grants * - * permission to link the code of this program with any version of the * - * OpenSSL library which is distributed under a license identical to that * - * listed in the included Copying.OpenSSL file, and distribute linked * - * combinations including the two. You must obey the GNU GPL in all * - * respects for all of the code used other than OpenSSL. If you modify * - * this file, you may extend this exception to your version of the file, * - * but you are not obligated to do so. * - * * - * If you received these files with a written license agreement or * - * contract stating terms other than the terms above, then that * - * alternative license agreement takes precedence over these comments. * - * * - * Source is provided to this software because we believe users have a * - * right to know exactly what a program is going to do before they run it. * - * This also allows you to audit the software for security holes (none * - * have been found so far). * - * * - * Source code also allows you to port Nmap to new platforms, fix bugs, * - * and add new features. You are highly encouraged to send your changes * - * to fyodor@insecure.org for possible incorporation into the main * - * distribution. By sending these changes to Fyodor or one the * - * Insecure.Org development mailing lists, it is assumed that you are * - * offering Fyodor and Insecure.Com LLC the unlimited, non-exclusive right * - * to reuse, modify, and relicense the code. Nmap will always be * - * available Open Source, but this is important because the inability to * - * relicense code has caused devastating problems for other Free Software * - * projects (such as KDE and NASM). We also occasionally relicense the * - * code to third parties as discussed above. If you wish to specify * - * special license conditions of your contributions, just say so when you * - * send them. * - * * - * This program is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * General Public License for more details at * - * http://www.gnu.org/copyleft/gpl.html , or in the COPYING file included * - * with Nmap. * - * * - ***************************************************************************/ - -/* $Id$ */ - -#ifdef WIN32 -#include -#endif /* WIN32 */ - -#include "nmapfe_error.h" - -void fatal(char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - fflush(stdout); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\nQUITTING!\n"); - va_end(ap); - exit(1); -} - -void error(char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - fflush(stdout); - vfprintf(stderr, fmt, ap); - fprintf(stderr, "\n"); - va_end(ap); - return; -} - - - -void pfatal(char *err, ...) { -#ifdef WIN32 - int lasterror =0; - char *errstr = NULL; -#endif - va_list ap;va_start(ap, err); - fflush(stdout); - vfprintf(stderr, err, ap); - va_end(ap); -#ifdef WIN32 - lasterror = GetLastError(); - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, NULL, lasterror, MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &errstr, 0, NULL); - fprintf(stderr, ": %s (%d)\n", errstr, lasterror); - HeapFree(GetProcessHeap(), 0, errstr); -#else - perror(" "); -#endif /* WIN32 perror() compatability switch */ - fflush(stderr); - exit(1); -} diff --git a/nmapfe/nmapfe_error.h b/nmapfe/nmapfe_error.h deleted file mode 100644 index 4bceadbfd..000000000 --- a/nmapfe/nmapfe_error.h +++ /dev/null @@ -1,127 +0,0 @@ - -/*************************************************************************** - * nmapfe_error.c -- Some simpilar error handling routines. Similar to * - * those used in Nmap. * - * * - ***********************IMPORTANT NMAP LICENSE TERMS************************ - * * - * The Nmap Security Scanner is (C) 1996-2006 Insecure.Com LLC. Nmap is * - * also a registered trademark of Insecure.Com LLC. This program is free * - * software; you may redistribute and/or modify it under the terms of the * - * GNU General Public License as published by the Free Software * - * Foundation; Version 2 with the clarifications and exceptions described * - * below. This guarantees your right to use, modify, and redistribute * - * this software under certain conditions. If you wish to embed Nmap * - * technology into proprietary software, we sell alternative licenses * - * (contact sales@insecure.com). Dozens of software vendors already * - * license Nmap technology such as host discovery, port scanning, OS * - * detection, and version detection. * - * * - * Note that the GPL places important restrictions on "derived works", yet * - * it does not provide a detailed definition of that term. To avoid * - * misunderstandings, we consider an application to constitute a * - * "derivative work" for the purpose of this license if it does any of the * - * following: * - * o Integrates source code from Nmap * - * o Reads or includes Nmap copyrighted data files, such as * - * nmap-os-fingerprints or nmap-service-probes. * - * o Executes Nmap and parses the results (as opposed to typical shell or * - * execution-menu apps, which simply display raw Nmap output and so are * - * not derivative works.) * - * o Integrates/includes/aggregates Nmap into a proprietary executable * - * installer, such as those produced by InstallShield. * - * o Links to a library or executes a program that does any of the above * - * * - * The term "Nmap" should be taken to also include any portions or derived * - * works of Nmap. This list is not exclusive, but is just meant to * - * clarify our interpretation of derived works with some common examples. * - * These restrictions only apply when you actually redistribute Nmap. For * - * example, nothing stops you from writing and selling a proprietary * - * front-end to Nmap. Just distribute it by itself, and point people to * - * http://insecure.org/nmap/ to download Nmap. * - * * - * We don't consider these to be added restrictions on top of the GPL, but * - * just a clarification of how we interpret "derived works" as it applies * - * to our GPL-licensed Nmap product. This is similar to the way Linus * - * Torvalds has announced his interpretation of how "derived works" * - * applies to Linux kernel modules. Our interpretation refers only to * - * Nmap - we don't speak for any other GPL products. * - * * - * If you have any questions about the GPL licensing restrictions on using * - * Nmap in non-GPL works, we would be happy to help. As mentioned above, * - * we also offer alternative license to integrate Nmap into proprietary * - * applications and appliances. These contracts have been sold to dozens * - * of software vendors, and generally include a perpetual license as well * - * as providing for priority support and updates as well as helping to * - * fund the continued development of Nmap technology. Please email * - * sales@insecure.com for further information. * - * * - * As a special exception to the GPL terms, Insecure.Com LLC grants * - * permission to link the code of this program with any version of the * - * OpenSSL library which is distributed under a license identical to that * - * listed in the included Copying.OpenSSL file, and distribute linked * - * combinations including the two. You must obey the GNU GPL in all * - * respects for all of the code used other than OpenSSL. If you modify * - * this file, you may extend this exception to your version of the file, * - * but you are not obligated to do so. * - * * - * If you received these files with a written license agreement or * - * contract stating terms other than the terms above, then that * - * alternative license agreement takes precedence over these comments. * - * * - * Source is provided to this software because we believe users have a * - * right to know exactly what a program is going to do before they run it. * - * This also allows you to audit the software for security holes (none * - * have been found so far). * - * * - * Source code also allows you to port Nmap to new platforms, fix bugs, * - * and add new features. You are highly encouraged to send your changes * - * to fyodor@insecure.org for possible incorporation into the main * - * distribution. By sending these changes to Fyodor or one the * - * Insecure.Org development mailing lists, it is assumed that you are * - * offering Fyodor and Insecure.Com LLC the unlimited, non-exclusive right * - * to reuse, modify, and relicense the code. Nmap will always be * - * available Open Source, but this is important because the inability to * - * relicense code has caused devastating problems for other Free Software * - * projects (such as KDE and NASM). We also occasionally relicense the * - * code to third parties as discussed above. If you wish to specify * - * special license conditions of your contributions, just say so when you * - * send them. * - * * - * This program is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * General Public License for more details at * - * http://www.gnu.org/copyleft/gpl.html , or in the COPYING file included * - * with Nmap. * - * * - ***************************************************************************/ - -/* $Id$ */ - - -#ifndef NMAPFE_ERROR_H -#define NMAPFE_ERROR_H -#include - -#include -#include - -#ifdef STDC_HEADERS -#include -#endif - -#if HAVE_UNISTD_H -#include -#endif - -#ifndef __attribute__ -#define __attribute__(args) -#endif - -void fatal(char *fmt, ...) __attribute__ ((format (printf, 1, 2))); -void error(char *fmt, ...) __attribute__ ((format (printf, 1, 2))); -void pfatal(char *err, ...) __attribute__ ((format (printf, 1, 2))); - -#endif /* NMAPFE_ERROR_H */ - diff --git a/nmapfe/nmapfe_sig.c b/nmapfe/nmapfe_sig.c deleted file mode 100644 index 737b2732f..000000000 --- a/nmapfe/nmapfe_sig.c +++ /dev/null @@ -1,1313 +0,0 @@ - -/*************************************************************************** - * nmapfe_sig.c -- Signal handlers for NmapFE * - * * - ***********************IMPORTANT NMAP LICENSE TERMS************************ - * * - * The Nmap Security Scanner is (C) 1996-2006 Insecure.Com LLC. Nmap is * - * also a registered trademark of Insecure.Com LLC. This program is free * - * software; you may redistribute and/or modify it under the terms of the * - * GNU General Public License as published by the Free Software * - * Foundation; Version 2 with the clarifications and exceptions described * - * below. This guarantees your right to use, modify, and redistribute * - * this software under certain conditions. If you wish to embed Nmap * - * technology into proprietary software, we sell alternative licenses * - * (contact sales@insecure.com). Dozens of software vendors already * - * license Nmap technology such as host discovery, port scanning, OS * - * detection, and version detection. * - * * - * Note that the GPL places important restrictions on "derived works", yet * - * it does not provide a detailed definition of that term. To avoid * - * misunderstandings, we consider an application to constitute a * - * "derivative work" for the purpose of this license if it does any of the * - * following: * - * o Integrates source code from Nmap * - * o Reads or includes Nmap copyrighted data files, such as * - * nmap-os-fingerprints or nmap-service-probes. * - * o Executes Nmap and parses the results (as opposed to typical shell or * - * execution-menu apps, which simply display raw Nmap output and so are * - * not derivative works.) * - * o Integrates/includes/aggregates Nmap into a proprietary executable * - * installer, such as those produced by InstallShield. * - * o Links to a library or executes a program that does any of the above * - * * - * The term "Nmap" should be taken to also include any portions or derived * - * works of Nmap. This list is not exclusive, but is just meant to * - * clarify our interpretation of derived works with some common examples. * - * These restrictions only apply when you actually redistribute Nmap. For * - * example, nothing stops you from writing and selling a proprietary * - * front-end to Nmap. Just distribute it by itself, and point people to * - * http://insecure.org/nmap/ to download Nmap. * - * * - * We don't consider these to be added restrictions on top of the GPL, but * - * just a clarification of how we interpret "derived works" as it applies * - * to our GPL-licensed Nmap product. This is similar to the way Linus * - * Torvalds has announced his interpretation of how "derived works" * - * applies to Linux kernel modules. Our interpretation refers only to * - * Nmap - we don't speak for any other GPL products. * - * * - * If you have any questions about the GPL licensing restrictions on using * - * Nmap in non-GPL works, we would be happy to help. As mentioned above, * - * we also offer alternative license to integrate Nmap into proprietary * - * applications and appliances. These contracts have been sold to dozens * - * of software vendors, and generally include a perpetual license as well * - * as providing for priority support and updates as well as helping to * - * fund the continued development of Nmap technology. Please email * - * sales@insecure.com for further information. * - * * - * As a special exception to the GPL terms, Insecure.Com LLC grants * - * permission to link the code of this program with any version of the * - * OpenSSL library which is distributed under a license identical to that * - * listed in the included Copying.OpenSSL file, and distribute linked * - * combinations including the two. You must obey the GNU GPL in all * - * respects for all of the code used other than OpenSSL. If you modify * - * this file, you may extend this exception to your version of the file, * - * but you are not obligated to do so. * - * * - * If you received these files with a written license agreement or * - * contract stating terms other than the terms above, then that * - * alternative license agreement takes precedence over these comments. * - * * - * Source is provided to this software because we believe users have a * - * right to know exactly what a program is going to do before they run it. * - * This also allows you to audit the software for security holes (none * - * have been found so far). * - * * - * Source code also allows you to port Nmap to new platforms, fix bugs, * - * and add new features. You are highly encouraged to send your changes * - * to fyodor@insecure.org for possible incorporation into the main * - * distribution. By sending these changes to Fyodor or one the * - * Insecure.Org development mailing lists, it is assumed that you are * - * offering Fyodor and Insecure.Com LLC the unlimited, non-exclusive right * - * to reuse, modify, and relicense the code. Nmap will always be * - * available Open Source, but this is important because the inability to * - * relicense code has caused devastating problems for other Free Software * - * projects (such as KDE and NASM). We also occasionally relicense the * - * code to third parties as discussed above. If you wish to specify * - * special license conditions of your contributions, just say so when you * - * send them. * - * * - * This program is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * General Public License for more details at * - * http://www.gnu.org/copyleft/gpl.html , or in the COPYING file included * - * with Nmap. * - * * - ***************************************************************************/ - -/* $Id$ */ - - -/* Original Author: Zach - * Mail: key@aye.net - * IRC: EFNet as zach` or key in #bastards or #neatoelito - * AIM (Aol): GoldMatrix - * - * Change the source as you wish, but leave these comments.. - * - * Long live Aol and pr: Phreak. - */ - -#ifndef MAX_PARSE_ARGS -#define MAX_PARSE_ARGS 512 -#endif - -#if MISSING_GTK -/* Do nothing, nmapfe.c will spit out an error */ -#else - -#include - -#include -#include -#include -#include -#if HAVE_UNISTD_H -#include -#endif -#include -#include -#include -#if HAVE_SYS_WAIT_H -#include -#endif -#include -#if HAVE_STRINGS_H -#include -#endif -#include -#include -#include - -#ifdef WIN32 -#include -#endif - -#include "nmapfe.h" -#include "nmapfe_sig.h" - -#ifndef BUFSIZ -#define BUFSIZ 8192 -#endif - - -extern struct NmapFEoptions opt; - -/* Variables for piping */ -/* FIXME: All this should be redone in a much more elegant manner */ -int nmap_pid = 0; -#ifdef WIN32 -HANDLE NmapHandle; -#endif -int pid; -#ifdef WIN32 -HANDLE pipes[2]; /* 0 == read; 1 == write */ -#else -int pipes[2] = {-1,-1}; -#endif -int verb = 0; - - - -int -main (int argc, - char *argv[]) -{ - GtkWidget *main_win; - GtkTextIter iter; - - gtk_set_locale(); - gtk_init(&argc, &argv); - -#ifndef WIN32 - signal(SIGPIPE, SIG_IGN); - opt.isr00t = !geteuid(); -#else - opt.isr00t = 1; /* With Windows (in general), every user is a Super User! */ -#endif - - main_win = create_main_win(); - gtk_widget_show(main_win); - - gtk_text_buffer_get_end_iter (opt.buffer, &iter); - gtk_text_buffer_insert_with_tags_by_name (opt.buffer, &iter, - (opt.isr00t) - ? "You are root - All options granted." - : "You are *NOT* root - Some options aren't available.", -1, - "normal", NULL); - - gtk_main(); - return 0; -} - -/* tokensz is the total size of token in characters */ -static char *next_token(char *buf, char *token, int tokensz) -{ - if ((buf != NULL) && (token != NULL)) { - int count = (strchr("\t ", *buf) != NULL) - ? strspn(buf, "\t ") - : strcspn(buf, "\t "); - - if (count > 0) { - char *bol = buf; - char *eol; - - count = MIN(count, tokensz - 1); - eol = buf+count; - - /* copy token */ - memcpy(token, buf, count); - token[count] = '\0'; - - /* remove token from str */ - while (*eol != '\0') - *bol++ = *eol++; - *bol = '\0'; - - return(token); - } - return(buf); - } - return(NULL); -} - - -static char *build_command() -{ -static char *command = NULL; -int command_size = 2560; - - /* Find how much to malloc() - * size = strlen(gtk_entry_get_text(GTK_ENTRY(opt.range_text))) + - * strlen(gtk_entry_get_text(GTK_ENTRY(opt.Decoy))) + - * strlen(gtk_entry_get_text(GTK_ENTRY(opt.inputFilename))) + - * strlen(gtk_entry_get_text(GTK_ENTRY(opt.SourceDevice)))+ - * strlen(gtk_entry_get_text(GTK_ENTRY(opt.scanRelay)))+ - * strlen(gtk_entry_get_text(GTK_ENTRY(opt.targetHost))) + - * 2560; - * We get 60 from the chars required for each option - */ - - if (!command) - command = safe_malloc(command_size); - - strcpy(command, "nmap "); - - /* select the scan type */ - if (opt.scanValue == CONNECT_SCAN) { - strcat(command, "-sT "); - } else if (opt.scanValue == PING_SCAN) { - strcat(command, "-sP "); - } else if (opt.scanValue == LIST_SCAN) { - strcat(command, "-sL "); - } else if (opt.scanValue == UDP_SCAN) { - strcat(command, "-sU "); - } else if (opt.scanValue == FIN_SCAN) { - strcat(command, "-sF "); - } else if (opt.scanValue == NULL_SCAN) { - strcat(command, "-sN "); - } else if (opt.scanValue == XMAS_SCAN) { - strcat(command, "-sX "); - } else if (opt.scanValue == ACK_SCAN) { - strcat(command, "-sA "); - } else if (opt.scanValue == WIN_SCAN) { - strcat(command, "-sW "); - } else if (opt.scanValue == MAIMON_SCAN) { - strcat(command, "-sM "); - } else if (opt.scanValue == PROT_SCAN) { - strcat(command, "-sO "); - } else if (opt.scanValue == SYN_SCAN) { - strcat(command, "-sS "); - } else if ((opt.scanValue == BOUNCE_SCAN) || (opt.scanValue == IDLE_SCAN)) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.scanRelay)); - - if (val) { - strcat(command, (opt.scanValue == IDLE_SCAN) ? "-sI " : "-b "); - strcat(command, (*val) ? val : "127.0.0.1"); - strcat(command, " "); - } - } - - if (GTK_WIDGET_SENSITIVE(opt.RPCInfo) && - GTK_TOGGLE_BUTTON(opt.RPCInfo)->active) - strcat(command, "-sR "); - - if (GTK_WIDGET_SENSITIVE(opt.VersionInfo) && - GTK_TOGGLE_BUTTON(opt.VersionInfo)->active) - strcat(command, "-sV "); - - if (GTK_WIDGET_SENSITIVE(opt.OSInfo) && - GTK_TOGGLE_BUTTON(opt.OSInfo)->active) - strcat(command, "-O "); - - if (GTK_WIDGET_SENSITIVE(opt.protportType)) { - if (opt.protportValue == FAST_PROTPORT) - strcat(command, "-F "); - else if (opt.protportValue == ALL_PROTPORT) - strcat(command, "-p- "); - else if (opt.protportValue == GIVEN_PROTPORT) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.protportRange)); - - if (val && *val) { - strcat(command, "-p "); - strcat(command, val); - strcat(command, " "); - } - } - } - - if (GTK_TOGGLE_BUTTON(opt.dontPing)->active) - strcat(command, "-P0 "); - else { - if (GTK_WIDGET_SENSITIVE(opt.icmpechoPing) && - GTK_TOGGLE_BUTTON(opt.icmpechoPing)->active) - strcat(command, "-PI "); - if (GTK_WIDGET_SENSITIVE(opt.icmptimePing) && - GTK_TOGGLE_BUTTON(opt.icmptimePing)->active) - strcat(command, "-PP "); - if (GTK_WIDGET_SENSITIVE(opt.icmpmaskPing) && - GTK_TOGGLE_BUTTON(opt.icmpmaskPing)->active) - strcat(command, "-PM "); - if (GTK_WIDGET_SENSITIVE(opt.tcpPing) && - GTK_TOGGLE_BUTTON(opt.tcpPing)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.tcpPingPorts)); - - strcat(command, "-PT"); - if (val && *val) - strcat(command, val); - strcat(command, " "); - } - if (GTK_WIDGET_SENSITIVE(opt.synPing) && - GTK_TOGGLE_BUTTON(opt.synPing)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.synPingPorts)); - - strcat(command, "-PS"); - if (val && *val) - strcat(command, val); - strcat(command, " "); - } - if (GTK_WIDGET_SENSITIVE(opt.udpPing) && - GTK_TOGGLE_BUTTON(opt.udpPing)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.udpPingPorts)); - - strcat(command, "-PU"); - if (val && *val) - strcat(command, val); - strcat(command, " "); - } - } - - - if ((opt.throttleValue != NO_THROTTLE) && (opt.throttleValue != NORMAL_THROTTLE)) - sprintf(command+strlen(command), "-T%u ", opt.throttleValue); - - if (GTK_TOGGLE_BUTTON(opt.startRtt)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.startRttTime)); - - sprintf(command+strlen(command), "--initial-rtt-timeout %d ", val); - } - - if (GTK_TOGGLE_BUTTON(opt.minRtt)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.minRttTime)); - - sprintf(command+strlen(command), "--min-rtt-timeout %d ", val); - } - - if (GTK_TOGGLE_BUTTON(opt.maxRtt)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.maxRttTime)); - - sprintf(command+strlen(command), "--max-rtt-timeout %d ", val); - } - - if (GTK_TOGGLE_BUTTON(opt.hostTimeout)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.hostTimeoutTime)); - - sprintf(command+strlen(command), "--host-timeout %d ", val); - } - - if (GTK_TOGGLE_BUTTON(opt.scanDelay)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.scanDelayTime)); - - sprintf(command+strlen(command), "--scan-delay %d ", val); - } - - if (GTK_TOGGLE_BUTTON(opt.ipv4Ttl)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.ipv4TtlValue)); - - sprintf(command+strlen(command), "--ttl %d ", val); - } - - if (GTK_TOGGLE_BUTTON(opt.minPar)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.minParSocks)); - - sprintf(command+strlen(command), "--min-parallelism %d ", val); - } - - if (GTK_TOGGLE_BUTTON(opt.maxPar)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.maxParSocks)); - - sprintf(command+strlen(command), "-M %d ", val); - } - - - if (opt.resolveValue == ALWAYS_RESOLVE) - strcat(command, "-R "); - else if (opt.resolveValue == NEVER_RESOLVE) - strcat(command, "-n "); - - if (GTK_TOGGLE_BUTTON(opt.verbose)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.verboseValue)); - - if (val == 1) - strcat(command, "-v "); - else if (val == 2) - strcat(command, "-vv "); - } - - if (GTK_TOGGLE_BUTTON(opt.debug)->active) { - int val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(opt.debugValue)); - - if (val > 0) { - strcat(command, "-d"); - - if (val > 1) - sprintf(command+strlen(command), "%d", val); - - strcat(command, " "); - } - } - - if (GTK_WIDGET_SENSITIVE(opt.useDecoy) && - GTK_TOGGLE_BUTTON(opt.useDecoy)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.Decoy)); - - if (val && *val) { - strcat(command, "-D "); - strcat(command, val); - strcat(command, " "); - } - } - - if (GTK_WIDGET_SENSITIVE(opt.useSourceDevice) && - GTK_TOGGLE_BUTTON(opt.useSourceDevice)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourceDevice)); - - if (val && *val) { - strcat(command, "-e "); - strcat(command, val); - strcat(command, " "); - } - } - - if (GTK_WIDGET_SENSITIVE(opt.useSourceIP) && - GTK_TOGGLE_BUTTON(opt.useSourceIP)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourceIP)); - - if (val && *val) { - strcat(command, "-S "); - strcat(command, val); - strcat(command, " "); - } - } - - if (GTK_WIDGET_SENSITIVE(opt.useSourcePort) && - GTK_TOGGLE_BUTTON(opt.useSourcePort)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.SourcePort)); - - if (val && *val) { - strcat(command, "-g "); - strcat(command, val); - strcat(command, " "); - } - } - - if (GTK_WIDGET_SENSITIVE(opt.useFragments) && - GTK_TOGGLE_BUTTON(opt.useFragments)->active) - strcat(command, "-f "); - - if (GTK_WIDGET_SENSITIVE(opt.useIPv6) && - GTK_TOGGLE_BUTTON(opt.useIPv6)->active) - strcat(command, "-6 "); - - if (GTK_WIDGET_SENSITIVE(opt.useOrderedPorts) && - GTK_TOGGLE_BUTTON(opt.useOrderedPorts)->active) - strcat(command, "-r "); - - if (GTK_WIDGET_SENSITIVE(opt.randomizeHosts) && - GTK_TOGGLE_BUTTON(opt.randomizeHosts)->active) - strcat(command, "--randomize-hosts "); - - if (GTK_WIDGET_SENSITIVE(opt.packetTrace) && - GTK_TOGGLE_BUTTON(opt.packetTrace)->active) - strcat(command, "--packet-trace "); - - if (GTK_WIDGET_SENSITIVE(opt.useInputFile) && - GTK_TOGGLE_BUTTON(opt.useInputFile)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.inputFilename)); - - if (val && *val) { - strcat(command, "-iL "); - strcat(command, val); - strcat(command, " "); - } - } - - if (GTK_WIDGET_SENSITIVE(opt.useOutputFile) && - GTK_TOGGLE_BUTTON(opt.useOutputFile)->active) { - const char *val = gtk_entry_get_text(GTK_ENTRY(opt.outputFilename)); - - if (val && *val) { - if (opt.outputFormatValue == NORMAL_OUTPUT) - strcat(command, "-oN "); - else if (opt.outputFormatValue == GREP_OUTPUT) - strcat(command, "-oG "); - else if (opt.outputFormatValue == XML_OUTPUT) - strcat(command, "-oX "); - else if (opt.outputFormatValue == ALL_OUTPUT) - strcat(command, "-oA "); - else if (opt.outputFormatValue == SKIDS_OUTPUT) - strcat(command, "-oS "); - strcat(command, val); - strcat(command, " "); - - if (GTK_TOGGLE_BUTTON(opt.outputAppend)->active) - strcat(command, "--append-output "); - } - } - - strcat(command, gtk_entry_get_text(GTK_ENTRY(opt.targetHost))); - - return(command); -} - -static void -print_line (GtkTextBuffer *buffer, - char *line) -{ - GtkTextIter iter; - gtk_text_buffer_get_end_iter (buffer, &iter); - - if (opt.viewValue == 1) { - char token[BUFSIZ+1]; - char *str; - - while (((str = next_token(line, token, sizeof(token) / sizeof(*token))) != NULL) && (*str != '\0')) { - /* Catch stuff */ - if (strstr(str, "http://") || - strstr(str, "PORT") || - strstr(str, "PROTOCOL") || - strstr(str, "STATE") || - strstr(str, "SERVICE") || - strstr(str, "VERSION") || - strstr(str, "(RPC)") || - strstr(str, "OWNER") || - strstr(str, "fingerprint")) { - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, str, -1, - "bold", NULL); - /* Color the ports... */ - } else if (strstr(str, "sftp") || - strstr(str, "mftp") || - strstr(str, "bftp") || - strstr(str, "tftp") || - strstr(str, "ftp") || - strstr(str, "NetBus") || - strstr(str, "kshell") || - strstr(str, "shell") || - strstr(str, "klogin") || - strstr(str, "login") || - strstr(str, "rtelnet") || - strstr(str, "telnet") || - strstr(str, "exec") || - strstr(str, "ssh") || - strstr(str, "linuxconf")) { - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, str, -1, - "red", NULL); - } else if (strstr(str, "imap2") || - strstr(str, "pop-3") || - strstr(str, "imap3") || - strstr(str, "smtps") || - strstr(str, "smtp") || - strstr(str, "pop-2")) { - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, str, -1, - "blue", NULL); - } else if (strstr(str, "systat") || - strstr(str, "netstat") || - strstr(str, "cfingerd") || - strstr(str, "finger") || - strstr(str, "netbios") || - strstr(str, "X11") || - strstr(str, "nfs") || - strstr(str, "sunrpc") || - strstr(str, "kpasswds") || - strstr(str, "https") || - strstr(str, "http")) { - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, str, -1, - "bold", NULL); - /******* BEGIN OS COLOR CODING *****************/ - /* Color the Operating systems */ - } else if (strstr(str, "Linux") || - strstr(str, "FreeBSD") || - strstr(str, "Win") || - strstr(str, "MacOS") || - strstr(str, "OpenBSD") || - strstr(str, "IRIX") || - strstr(str, "Windows")) { - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, str, -1, - "green", NULL); - } else { - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, str, -1, - "normal", NULL); - } - } - } else { - gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, line, -1, - "normal", NULL); - } -} - -void scanButton_toggled_cb(GtkButton *button, void *ignored) -{ - if(GTK_TOGGLE_BUTTON(button)->active) { - char *command = build_command(); - - if(!(opt.appendLog)) - gtk_text_buffer_set_text (GTK_TEXT_BUFFER(opt.buffer), "\0", -1); - - nmap_pid = execute(command); -} - else { - if (stop_scan()) { - static char string[256]; - - strcpy(string, "CANCELLED!\n\n"); - print_line(GTK_TEXT_BUFFER(opt.buffer), string); -} -} -} - - -void -saveLog (char *filename) -{ - GtkTextIter start, end; - if (filename && *filename) { - FILE *file; - if ((file = fopen(filename, "w"))) { - gchar *text; - gtk_text_buffer_get_start_iter(opt.buffer, &start); - gtk_text_buffer_get_end_iter(opt.buffer, &end); - text = gtk_text_buffer_get_text(opt.buffer, - &start, &end, FALSE); - - fputs(text, file); - fclose(file); - free(text); - } - } -} - - -void openLog(char *filename) -{ - if (filename && *filename) { - FILE *file; - - if (!opt.appendLog) - gtk_text_buffer_set_text (GTK_TEXT_BUFFER(opt.buffer), "\0", -1); - - if((file = fopen(filename, "r"))) { - char buf[BUFSIZ+1]; - - while(fgets(buf, BUFSIZ, file) != NULL) { - print_line(GTK_TEXT_BUFFER(opt.buffer), buf); - } - - fclose(file); - } - } -} - - -void okButton_clicked_cb(GtkWidget *window, GtkButton *button) -{ -const char *selected = gtk_file_selection_get_filename(GTK_FILE_SELECTION(window)); -void (*action)() = (void (*)())g_object_get_data(G_OBJECT(window), "NmapFE_action"); -GtkEntry *entry = g_object_get_data(G_OBJECT(window), "NmapFE_entry"); -char *filename = g_object_get_data(G_OBJECT(window), "NmapFE_filename"); - - if (filename && selected) { - strncpy(filename, selected, FILENAME_MAX); - filename[FILENAME_MAX-1] = '\0'; - if (action) - (*action)(filename); - if (entry) - gtk_entry_set_text(GTK_ENTRY(entry), filename); - } -} - -/* split buf into first line and remainder by - copying the first line into line and stripping it from str; - return the first line from str or NULL if str contains no full line. - bufsz is the number of chars in buf. - */ -static char *next_line(char *buf, int bufsz, char *line) -{ - if ((buf != NULL) && (line != NULL)) { - char *eol = strchr(buf, '\n'); - - if (eol != NULL) { - char *bol = buf; - int linelen = MIN(bufsz - 1, eol - buf + 1); /* we can't exceed buffer size */ - - /* copy line including \n to line */ - memcpy(line, buf, linelen); - line[linelen] = '\0'; - - eol = buf + linelen; - - /* remove line from str */ - while (*eol != '\0') - *bol++ = *eol++; - *bol = '\0'; - - return(line); - } - return(buf); - } - return(NULL); -} - -/* The read_from_pipe functions (UNIX & Win versions) do a non-blocking read from the pipe - given into the buffer given up to a maximum read length of bufsz. The number of bytes - read is returned. -1 is returned in the case of heinous error. Returned buffer is NOT - NUL terminated */ -#ifdef WIN32 - -static int read_from_pipe(HANDLE pipe, char *buf, int bufsz) -{ -int ret; -int count = 0; - -/* First lets check if anything is ready for us. - Note: I don't know if this technique even works! */ - ret = WaitForSingleObject(pipe, 0); - if ( ret == WAIT_OBJECT_0 ) { - /* Apparently the pipe is available for reading -- Read up to # of bytes in buffer */ - if (!ReadFile(pipe, buf, bufsz, &count, NULL)) { - if (GetLastError() != ERROR_BROKEN_PIPE) - pfatal("ReadFile on Nmap process pipe failed!"); - } - } - return count; -} - -#else - -/* NOTE: pipefd must be in O_NONBLOCK mode ( via fcntl ) */ -static int read_from_pipe(int pipefd, char *buf, int bufsz) -{ -int count; - - if (pipefd == -1) return -1; - count = read(pipefd, buf, bufsz); - if (count == -1 && errno != EINTR && errno != EAGAIN) { - pfatal("Failed to read from nmap process pipe"); - } - return count; -} - -#endif /* read_from_pipe Win32/UNIX selector */ - - -static gint read_data(gpointer data) -{ - static char buf[BUFSIZ+1] = ""; - static int buflen = 0; - char line[BUFSIZ+1]; -int count; - -#ifdef WIN32 - int rc; - char *p=NULL, *q=NULL; -#endif /* WIN32 */ - - while((count = read_from_pipe(pipes[0], buf+buflen, sizeof(buf) - buflen - 1 )) > 0) { - char *str; - - /* fprintf(stderr, "\nCount was %d\n", count); */ - buflen += count; - buf[buflen] = '\0'; - -#ifdef WIN32 - /* For windows, I have to squeeze \r\n back into \n */ - p = q = buf; - while(*q) { if (*q == '\r') q++; else *p++ = *q++; } - *p = '\0'; -#endif /* WIN32 */ - - for (str = next_line(buf, sizeof(buf) / sizeof(*buf), line); - (str != buf) && (str != NULL); - str = next_line(buf, sizeof(buf) / sizeof(*buf), line)) { - buflen = strlen(buf); - print_line(opt.buffer, str); - } - } - - /* fprintf(stderr, "Below loop: Count was %d\n", count); */ - - if (buflen > 0) { - char *str; - - while ((str = next_line(buf, sizeof(buf) / sizeof(*buf), line)) != NULL) { - buflen = strlen(buf); - print_line(opt.buffer, str); - if (str == buf) - break; - } - } - -#ifdef WIN32 - if (nmap_pid) { - rc = WaitForSingleObject(NmapHandle, 0); - if (rc == WAIT_FAILED) { - pfatal("Failed in WaitForSingleObject to see if Nmap process has died"); - } - } - if (!nmap_pid || rc == WAIT_OBJECT_0) { - CloseHandle(NmapHandle); - CloseHandle(pipes[0]); - nmap_pid = 0; - buflen = 0; - buf[buflen] = '\0'; - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt.scanButton), 0); - return 0; - } -#else - if (!nmap_pid || (waitpid(0, NULL, WNOHANG) == nmap_pid)) { - /* fprintf(stderr, "Program gone, dead, kablooey!\n"); */ - nmap_pid = 0; - if (pipes[0] != -1) { - close(pipes[0]); - pipes[0] = -1; - } - buflen = 0; - buf[buflen] = '\0'; - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt.scanButton), 0); - return 0; - } -#endif /* waitpid unix/windoze selector */ - - return(1); -} - - -/* The idea of execute() is to create an Nmap process running in the background with its stdout - connected to a pipe we can poll many times per second to collect any new output. Admittedly - there are much more elegant ways to do this, but this is how it works now. The functions - return the process ID of nmap. This process is - different enough between windows & UNIX that I have two functions for doing it: */ -static int execute_unix(char *command) -{ -#ifdef WIN32 - fatal("The execute_unix function should not be called from Windows!"); - return -1; -#else - - /* Many thanks to Fyodor for helping with the piping */ - if (pipe(pipes) == -1) { - perror("poopy pipe error"); - exit(1); - } - - if (!(pid = fork())) { - char **argv; - int argc; - - argc = arg_parse(command, &argv); - - if (argc <= 0) - exit(1); - dup2(pipes[1], 1); - dup2(pipes[1], 2); - fcntl(pipes[0], F_SETFL, O_NDELAY); - if (execvp("nmap", argv) == -1) { - fprintf(stderr, "Nmap execution failed. errno=%d (%s)\n", errno, strerror(errno)); - exit(1); - } - /*exit(127);*/ - } - if (pid == -1) { - fprintf(stderr, "fork() failed. errno=%d (%s)", errno, strerror(errno)); - pid = 0; - close(pipes[0]); - pipes[0] = -1; - } - close(pipes[1]); - pipes[1] = -1; - - return(pid); - -#endif -} - - -#ifdef WIN32 -/* Parts cribbed from _Win32 System Programming Second Edition_ pp 304 */ -static int execute_win(char *command) -{ - -/* For pipes[] array: 0 == READ; 1 == WRITE */ - -/* To ensure pipe handles are inheritable */ -SECURITY_ATTRIBUTES PipeSA = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE }; -PROCESS_INFORMATION Nmap_Proc; -STARTUPINFO Nmap_Start; - - GetStartupInfo(&Nmap_Start); - - /* Create our pipe for reading Nmap output */ - if (!CreatePipe(&pipes[0], &pipes[1], &PipeSA, 8196)) - pfatal("execute_win: Failed to create pipes!"); - - /* Insure that stdout/stderr for Nmap will go to our pipe */ - Nmap_Start.hStdInput = GetStdHandle(STD_INPUT_HANDLE); - Nmap_Start.hStdError = pipes[1]; - Nmap_Start.hStdOutput = pipes[1]; - Nmap_Start.dwFlags = STARTF_USESTDHANDLES; - - /* Start up Nmap! */ - if (!CreateProcess ( NULL, command, NULL, NULL, TRUE, 0, NULL, NULL, &Nmap_Start, &Nmap_Proc)) - pfatal("execute_win: Failed to start Nmap process with command '%s'", command); - - /* I don't care about the thread handle or the write pipe anymore */ - CloseHandle(Nmap_Proc.hThread); - CloseHandle(pipes[1]); - - /* I'm gonna squirrel away the Nmap process handle in a global variable. - All this nonsense needs to be redone */ - NmapHandle = Nmap_Proc.hProcess; - - return Nmap_Proc.dwProcessId; - - -} -#endif /* WIN32 */ - -int execute(char *command) -{ -#ifdef WIN32 -int pid = execute_win(command); -#else -int pid = execute_unix(command); -#endif /* WIN32 */ - -/* timer for calling our read function to poll for new data 8 times per second */ - g_timeout_add(125, read_data, NULL); - - return(pid); -} - - -void display_nmap_command() -{ -char *command = build_command(); - - gtk_entry_set_text(GTK_ENTRY(opt.commandEntry), command); -} - - -void display_nmap_command_cb(GtkWidget *target_option, void *ignored) -{ - display_nmap_command(); -} - - -void browseButton_pressed_cb(GtkWidget *widget, GtkWidget *text) -{ -static char filename[FILENAME_MAX+1] = ""; -const char *name = gtk_entry_get_text(GTK_ENTRY(text)); - - if (name && *name) { - strncpy(filename, name, FILENAME_MAX); - filename[FILENAME_MAX] = '\0'; - } - - gtk_widget_show(create_fileSelection("Select File", filename, NULL, GTK_ENTRY(text))); -} - -void scanType_cb -(GtkComboBox *w, gpointer data) -{ - Entry *user = data; - gint i = 0, j, k; - - j = gtk_combo_box_get_active(w); - - if (opt.isr00t) { - k = j; - } else { - for (k = 0; user[k].scantype; k++) { - if (user[k].rootonly != TRUE) { - if (i == j) { - break; - } - i++; - } - } - } - opt.scanValue = user[k].scantype; - - if ((opt.scanValue == PING_SCAN) || (opt.scanValue == LIST_SCAN)) { - /* gtk_widget_set_sensitive(GTK_WIDGET(opt.protportFrame), FALSE); */ - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportType), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportLabel), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportRange), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.OSInfo), FALSE); - } else { - /* gtk_widget_set_sensitive(GTK_WIDGET(opt.protportFrame), TRUE); */ - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportType), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportLabel), - (opt.protportValue == GIVEN_PROTPORT)); - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportRange), - (opt.protportValue == GIVEN_PROTPORT)); - gtk_widget_set_sensitive(GTK_WIDGET(opt.OSInfo), TRUE); - } - - if ((opt.scanValue == PING_SCAN) || - (opt.scanValue == LIST_SCAN) || (opt.scanValue == PROT_SCAN)) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.RPCInfo), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.VersionInfo), FALSE); - } else { - gtk_widget_set_sensitive(GTK_WIDGET(opt.RPCInfo), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.VersionInfo), TRUE); - } - - if ((opt.scanValue == CONNECT_SCAN) || (opt.scanValue == BOUNCE_SCAN)) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.useDecoy), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.Decoy), FALSE); - } else if (opt.isr00t) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.useDecoy), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.Decoy), TRUE); - } - - if ((opt.scanValue != ACK_SCAN) && - (opt.scanValue != MAIMON_SCAN) && (opt.scanValue != FIN_SCAN) && - (opt.scanValue != SYN_SCAN) && (opt.scanValue != NULL_SCAN) && - (opt.scanValue != XMAS_SCAN) && (opt.scanValue != WIN_SCAN)) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useFragments), FALSE); - else if (opt.isr00t) - gtk_widget_set_sensitive(GTK_WIDGET(opt.useFragments), TRUE); - - if ((opt.scanValue == BOUNCE_SCAN) || (opt.scanValue == IDLE_SCAN)) { - gtk_label_set_text(GTK_LABEL(opt.scanRelayLabel), - (opt.scanValue == BOUNCE_SCAN) ? "Bounce Host:" : "Zombie Host:"); - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanRelayLabel), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanRelay), TRUE); - gtk_widget_grab_focus(GTK_WIDGET(opt.scanRelay)); - } else { - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanRelayLabel), FALSE); - gtk_label_set_text(GTK_LABEL(opt.scanRelayLabel), "Relay Host:"); - gtk_widget_set_sensitive(GTK_WIDGET(opt.scanRelay), FALSE); - } - - g_object_set(G_OBJECT(opt.protportFrame), "label", - (opt.scanValue == PROT_SCAN) ? "Scanned Protocols" : "Scanned Ports", NULL); - - display_nmap_command(); -} - - -void pingButton_toggled_cb(GtkWidget *ping_button, void *ignored) -{ -gboolean status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ping_button)); - - if (ping_button == opt.dontPing) { - gboolean localstatus = (GTK_TOGGLE_BUTTON(opt.tcpPing)->active) && (!status); - - gtk_widget_set_sensitive(GTK_WIDGET(opt.tcpPing), !status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.tcpPingLabel), localstatus); - gtk_widget_set_sensitive(GTK_WIDGET(opt.tcpPingPorts), localstatus); - if (opt.isr00t) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.icmpechoPing), !status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.icmpmaskPing), !status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.icmptimePing), !status); - - localstatus = (GTK_TOGGLE_BUTTON(opt.synPing)->active) && (!status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPing), !status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPingLabel), localstatus); - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPingPorts), localstatus); - - localstatus = (GTK_TOGGLE_BUTTON(opt.udpPing)->active) && (!status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPing), !status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPingLabel), localstatus); - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPingPorts), localstatus); - } - } - else if (ping_button == opt.tcpPing) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.tcpPingLabel), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.tcpPingPorts), status); - } - else if ((ping_button == opt.synPing) && (opt.isr00t)) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPingLabel), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.synPingPorts), status); - } - else if ((ping_button == opt.udpPing) && (opt.isr00t)) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPingLabel), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.udpPingPorts), status); - } - - display_nmap_command(); -} - - -void throttleType_cb (GtkComboBox *w, gpointer data) -{ - opt.throttleValue = gtk_combo_box_get_active(w); - display_nmap_command(); -} - - -void resolveType_cb (GtkComboBox *w, gpointer data) -{ - opt.resolveValue = gtk_combo_box_get_active(w); - display_nmap_command(); -} - - -void protportType_cb(GtkComboBox *w, gpointer d) -{ - opt.protportValue = gtk_combo_box_get_active(w); - - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportLabel), - (opt.protportValue == GIVEN_PROTPORT)); - gtk_widget_set_sensitive(GTK_WIDGET(opt.protportRange), - (opt.protportValue == GIVEN_PROTPORT)); - if (opt.protportValue == GIVEN_PROTPORT) - gtk_widget_grab_focus(GTK_WIDGET(opt.protportRange)); - - display_nmap_command(); -} - - -/* callback for factory generated menu items: set variable to action */ -void outputFormatType_cb(GtkComboBox *w, gpointer d) -{ - opt.outputFormatValue = gtk_combo_box_get_active(w); - display_nmap_command(); -} - - -/* callback for toggle buttons: control other objects seneistivity */ -void toggle_button_set_sensitive_cb(GtkWidget *master, GtkWidget *slave) -{ - if ((master != NULL) && (slave != NULL) && GTK_IS_TOGGLE_BUTTON(master)) - gtk_widget_set_sensitive(GTK_WIDGET(slave), GTK_TOGGLE_BUTTON(master)->active); - - display_nmap_command(); -} - - -void validate_file_change(GtkWidget *button, void *ignored) -{ -gboolean status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)); - - if (button == opt.useInputFile) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.targetHost), !status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.inputFilename), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.inputBrowse), status); - } else if (button == opt.useOutputFile) { - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFilename), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputBrowse), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFormatLabel), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputFormatType), status); - gtk_widget_set_sensitive(GTK_WIDGET(opt.outputAppend), status); - } - - display_nmap_command(); -} - - -void validate_option_change(GtkWidget *target_option, void *ignored) -{ -gboolean status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(target_option)); - - if ((target_option == opt.useInputFile) && (status)) - gtk_entry_set_text(GTK_ENTRY(opt.targetHost), ""); - - display_nmap_command(); -} - -gboolean stop_scan() -{ - /* fprintf(stderr, "stop scan called -- pid == %d\n", nmap_pid); */ - if (nmap_pid) { - -#ifdef WIN32 - TerminateProcess(NmapHandle, 1); - CloseHandle(NmapHandle); - CloseHandle(pipes[0]); -#else - kill(nmap_pid, 9); - if (pipes[0] != -1) { - close(pipes[0]); - pipes[0] = -1; - } -#endif /* Win32/UNIX Selector for killing Nmap */ - - nmap_pid = 0; - - return(TRUE); - } - return(FALSE); -} - -void on_verb_activate(GtkMenuItem *menuitem, gpointer user_data) -{ - /* toggle verb */ - verb = (verb) ? 0 : 1; - - display_nmap_command(); -} - -/***************************************************************/ - -/* This function takes a command and the address of an uninitialized - char ** . It parses the command (by seperating out whitespace) - into an argv[] style char **, which it sets the argv parameter to. - The function returns the number of items filled up in the array - (argc), or -1 in the case of an error. This function allocates - memory for argv and thus it must be freed -- use argv_parse_free() - for that. If arg_parse returns <1, then argv does not need to be freed. - The returned arrays are always terminated with a NULL pointer */ -int arg_parse(const char *command, char ***argv) -{ -char **myargv = NULL; -int argc = 0; -char mycommand[4096]; -char *start, *end; -char oldend; - - *argv = NULL; - if (Strncpy(mycommand, command, 4096) == -1) { - return -1; - } - myargv = calloc(MAX_PARSE_ARGS + 2, sizeof(char *)); - myargv[0] = (char *) 0x123456; /* Integrity checker */ - myargv++; - start = mycommand; - while(start && *start) { - while(*start && isspace(*start)) - start++; - if (*start == '"') { - start++; - end = strchr(start, '"'); - } else if (*start == '\'') { - start++; - end = strchr(start, '\''); - } else if (!*start) { - continue; - } else { - end = start+1; - while(*end && !isspace(*end)) { - end++; - } - } - if (!end) { - arg_parse_free(myargv); - return -1; - } - if (argc >= MAX_PARSE_ARGS) { - arg_parse_free(myargv); - return -1; - } - oldend = *end; - *end = '\0'; - myargv[argc++] = strdup(start); - if (oldend) - start = end + 1; - else start = end; - } - myargv[argc+1] = 0; - *argv = myargv; - return argc; -} - -/* Free an argv allocated inside arg_parse */ -void arg_parse_free(char **argv) -{ -char **current; - - /* Integrity check */ - argv--; - assert(argv[0] == (char *) 0x123456); - current = argv + 1; - while(*current) { - free(*current); - current++; - } - free(argv); -} - - -#endif /* MISSING_GTK */ diff --git a/nmapfe/nmapfe_sig.h b/nmapfe/nmapfe_sig.h deleted file mode 100644 index 61719032e..000000000 --- a/nmapfe/nmapfe_sig.h +++ /dev/null @@ -1,153 +0,0 @@ - -/*************************************************************************** - * nmapfe_sig.h -- Signal handlers for NmapFE * - * * - ***********************IMPORTANT NMAP LICENSE TERMS************************ - * * - * The Nmap Security Scanner is (C) 1996-2006 Insecure.Com LLC. Nmap is * - * also a registered trademark of Insecure.Com LLC. This program is free * - * software; you may redistribute and/or modify it under the terms of the * - * GNU General Public License as published by the Free Software * - * Foundation; Version 2 with the clarifications and exceptions described * - * below. This guarantees your right to use, modify, and redistribute * - * this software under certain conditions. If you wish to embed Nmap * - * technology into proprietary software, we sell alternative licenses * - * (contact sales@insecure.com). Dozens of software vendors already * - * license Nmap technology such as host discovery, port scanning, OS * - * detection, and version detection. * - * * - * Note that the GPL places important restrictions on "derived works", yet * - * it does not provide a detailed definition of that term. To avoid * - * misunderstandings, we consider an application to constitute a * - * "derivative work" for the purpose of this license if it does any of the * - * following: * - * o Integrates source code from Nmap * - * o Reads or includes Nmap copyrighted data files, such as * - * nmap-os-fingerprints or nmap-service-probes. * - * o Executes Nmap and parses the results (as opposed to typical shell or * - * execution-menu apps, which simply display raw Nmap output and so are * - * not derivative works.) * - * o Integrates/includes/aggregates Nmap into a proprietary executable * - * installer, such as those produced by InstallShield. * - * o Links to a library or executes a program that does any of the above * - * * - * The term "Nmap" should be taken to also include any portions or derived * - * works of Nmap. This list is not exclusive, but is just meant to * - * clarify our interpretation of derived works with some common examples. * - * These restrictions only apply when you actually redistribute Nmap. For * - * example, nothing stops you from writing and selling a proprietary * - * front-end to Nmap. Just distribute it by itself, and point people to * - * http://insecure.org/nmap/ to download Nmap. * - * * - * We don't consider these to be added restrictions on top of the GPL, but * - * just a clarification of how we interpret "derived works" as it applies * - * to our GPL-licensed Nmap product. This is similar to the way Linus * - * Torvalds has announced his interpretation of how "derived works" * - * applies to Linux kernel modules. Our interpretation refers only to * - * Nmap - we don't speak for any other GPL products. * - * * - * If you have any questions about the GPL licensing restrictions on using * - * Nmap in non-GPL works, we would be happy to help. As mentioned above, * - * we also offer alternative license to integrate Nmap into proprietary * - * applications and appliances. These contracts have been sold to dozens * - * of software vendors, and generally include a perpetual license as well * - * as providing for priority support and updates as well as helping to * - * fund the continued development of Nmap technology. Please email * - * sales@insecure.com for further information. * - * * - * As a special exception to the GPL terms, Insecure.Com LLC grants * - * permission to link the code of this program with any version of the * - * OpenSSL library which is distributed under a license identical to that * - * listed in the included Copying.OpenSSL file, and distribute linked * - * combinations including the two. You must obey the GNU GPL in all * - * respects for all of the code used other than OpenSSL. If you modify * - * this file, you may extend this exception to your version of the file, * - * but you are not obligated to do so. * - * * - * If you received these files with a written license agreement or * - * contract stating terms other than the terms above, then that * - * alternative license agreement takes precedence over these comments. * - * * - * Source is provided to this software because we believe users have a * - * right to know exactly what a program is going to do before they run it. * - * This also allows you to audit the software for security holes (none * - * have been found so far). * - * * - * Source code also allows you to port Nmap to new platforms, fix bugs, * - * and add new features. You are highly encouraged to send your changes * - * to fyodor@insecure.org for possible incorporation into the main * - * distribution. By sending these changes to Fyodor or one the * - * Insecure.Org development mailing lists, it is assumed that you are * - * offering Fyodor and Insecure.Com LLC the unlimited, non-exclusive right * - * to reuse, modify, and relicense the code. Nmap will always be * - * available Open Source, but this is important because the inability to * - * relicense code has caused devastating problems for other Free Software * - * projects (such as KDE and NASM). We also occasionally relicense the * - * code to third parties as discussed above. If you wish to specify * - * special license conditions of your contributions, just say so when you * - * send them. * - * * - * This program is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * General Public License for more details at * - * http://www.gnu.org/copyleft/gpl.html , or in the COPYING file included * - * with Nmap. * - * * - ***************************************************************************/ - -/* $Id$ */ - -/* Original Author: Zach - * Mail: key@aye.net - * IRC: EFNet as zach` or key in #bastards or #neatoelito - * AIM (Aol): GoldMatrix - * - * Change the source as you wish, but leave these comments.. - * - * Long live Aol and pr: Phreak. :-) - */ - -#ifndef NMAPFE_SIG_H -#define NMAPFE_SIG_H - -#if MISSING_GTK -#error "Your system does not appear to have GTK (www.gtk.org) installed. Thus the Nmap X Front End will not compile. You should still be able to use Nmap the normal way (via text console). GUIs are for wimps anyway :)" -#endif - - -#include -#include - -#include "nmapfe_error.h" - -gboolean stop_scan(); - -void throttleType_cb (GtkComboBox *, gpointer); -void resolveType_cb (GtkComboBox *, gpointer); -void protportType_cb (GtkComboBox *, gpointer); -void outputFormatType_cb (GtkComboBox *, gpointer); - -void pingButton_toggled_cb(GtkWidget *ping_button, void *ignored); -void toggle_button_set_sensitive_cb(GtkWidget *master, GtkWidget *slave); -void validate_file_change(GtkWidget *button, void *ignored); -void validate_option_change(GtkWidget *target_option, void *ignored); -void browseButton_pressed_cb(GtkWidget *widget, GtkWidget *text); -void display_nmap_command_cb(GtkWidget *target_option, void *ignored); -void display_nmap_command(); - -int execute(char *command); - -void scanButton_toggled_cb(GtkButton *button, void *ignored); - -void exitNmapFE_cb(GtkButton *button, void *ignored); - -void okButton_clicked_cb(GtkWidget *window, GtkButton *button); - -/* A few functions that should be in a util file (in fact, they should - share the same util file Nmap uses IMHO */ -int arg_parse(const char *command, char ***argv); -void arg_parse_free(char **argv); - -#endif /* NMAPFE_SIG_H */ -