r3888: Automatic commit for debian_version_4_1_0-1
[ctsim.git] / configure.ac
index 68784fcedbaf31a242e692fb4fb32fceb37cff52..4ad6678a5978025ac2001a0a8e1c09d2e7c95acf 100644 (file)
@@ -68,6 +68,7 @@ AC_CHECK_FUNC(setjmp)
 AC_CHECK_FUNC(setpriority)
 AC_CHECK_FUNC(time)
 AC_CHECK_FUNC(gettimeofday)
+AC_CHECK_FUNC(getopt, [ getopt=true ], [ getopt=false ])
 
 if test "${OSTYPE}" = "cygwin" ; then
   getopt_long=false
@@ -132,10 +133,11 @@ AC_MSG_CHECKING(sstream)
  if [ test -f /usr/include/sstream || test -f /usr/include/g++/sstream ||
      test -f /usr/include/g++-2/sstream || test -f /usr/include/g++-3/sstream ||
      test -f /usr/include/gcc/darwin/3.1/g++-v3/sstream ]; then
-  AC_DEFINE(HAVE_SSTREAM,1,[sstream header])
-  AC_MSG_RESULT(yes)
-fi
-AC_MSG_RESULT(no)
+   AC_DEFINE(HAVE_SSTREAM,1,[sstream header])
+   AC_MSG_RESULT(yes)
+  else
+   AC_MSG_RESULT(no)
+ fi
 
 
 CFLAGS="$CFLAGS -Wall"
@@ -239,6 +241,17 @@ else
   fi
 fi
 
+dnl Set CPU
+AC_ARG_WITH(cpu,
+[  --with-cpu[=CPU]       Set name of CPU for gcc -mcpu=])
+
+if test "$withval" == "pentium4" -o "$withval" == "athlon-mp" ; then
+  AC_MSG_CHECKING([Setting CPU to $withval])
+  CFLAGS="$CFLAGS -mcpu=$withval"
+else
+  AC_MSG_CHECKING([Unknown CPU $withval])
+fi
+
 AC_MSG_CHECKING([for web access])
 dnl Set cgi-bin directory
 AC_ARG_WITH(cgibin-dir, [  --with-cgibin-dir=PATH  Set path of CGI binaries directory ],