Nmap Development mailing list archives

Re: nmap doesn't compile on Solaris 9 with Sun Studio Pro


From: "Peter O'Gorman" <pogma () thewrittenword com>
Date: Tue, 19 Dec 2006 13:54:01 +0900

On Mon, Dec 18, 2006 at 06:49:38PM -0500, Leo Zhadanovsky wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I took our -MM and this is what happens:


Well, I think -MM only works with gcc like compilers, so we did this:
In configure.ac, we added:
@@ -47,11 +47,17 @@
   AC_MSG_ERROR([Could not locate a C++ compiler. If it exists, add it to your P
ATH or give configure the CXX=path_to_compiler argument.  Otherwise, install a C ++ compiler such as g++ or install a 
binary package of Nmap (see http://www.inse cure.org/nmap/nmap_download.html ))])
 fi

+
+HAVE_GXX='# '
+AC_SUBST(HAVE_GXX)
+
 nmap_gcc_major_version=0
 AC_MSG_CHECKING([whether the compiler is gcc 4 or greater])
-if test x"$GXX" = xno; then
-  AC_MSG_RESULT([no])
-else
+if test x"$GXX" = xyes; then
+  HAVE_GXX=
+  # I have no idea why we check for g++ above and mess with gcc
+  # below ...
+
   # On some distros, there are snapshots available as gcc4
   if test -z "$ac_cv_prog_CC" || test x"$CC" = xgcc4; then
     our_gcc="$CC"
@@ -78,6 +84,8 @@
   else
     AC_MSG_RESULT([no])
   fi
+else
+  AC_MSG_RESULT([no])
 fi


Part of the change above is because on AIX with xlC GXX was not set to
no, but was empty, so the configure script required user interaction
when xlC spewed its help page to make the help page go away.

And in Makefile.in we changed:
-makefile.dep:
-       $(CXX) -MM $(CXXFLAGS) $(CPPFLAGS) $(SRCS) > $@
-include makefile.dep
+@HAVE_GXX () makefile dep:
+@HAVE_GXX@     $(CXX) -MM $(CXXFLAGS) $(CPPFLAGS) $(SRCS) > $@
+@HAVE_GXX@include makefile.dep

We have some more patches coming, but not complete yet.

Peter 

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: