Update copyright date; remove old CVS keyword
[ctsim.git] / configure
index 24b3fba32c64137fe69ebf5f561c566668d4d88c..97e2f81940678d5ddc4c7dbf5b83b272a58c7e3c 100755 (executable)
--- a/configure
+++ b/configure
@@ -2948,6 +2948,8 @@ ac_config_headers="$ac_config_headers config.h"
 CFLAGS=""
 CXXFLAGS=""
 
+CFLAGS="${CFLAGS}"
+
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5572,13 +5574,59 @@ else
 fi
 
 wxwin=false
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgtk-x11-2.0" >&5
+$as_echo_n "checking for main in -lgtk-x11-2.0... " >&6; }
+if test "${ac_cv_lib_gtk_x11_2_0_main+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgtk-x11-2.0  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gtk_x11_2_0_main=yes
+else
+  ac_cv_lib_gtk_x11_2_0_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gtk_x11_2_0_main" >&5
+$as_echo "$ac_cv_lib_gtk_x11_2_0_main" >&6; }
+if test "x$ac_cv_lib_gtk_x11_2_0_main" = x""yes; then :
+  hasx11gtk2=true
+fi
+
+if test "x$hasx11gtk2" = "x" ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Does not have X11 GTK2" >&5
+$as_echo "$as_me: Does not have X11 GTK2" >&6;}
+
+
+fi
+if test "$hasx11gtk2" = "true" ; then
+
+
+  CFLAGS="${CFLAGS} ${g76GTK_CFLAGS} ${GLIB_CFLAGS}"
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwx_gtk2u_core-2.8" >&5
 $as_echo_n "checking for main in -lwx_gtk2u_core-2.8... " >&6; }
 if test "${ac_cv_lib_wx_gtk2u_core_2_8_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lwx_gtk2u_core-2.8 -L/usr/lib64 -L/usr/lib `gtk-config --libs` `glib-config --libs glib gmodule gthread`  $LIBS"
+LIBS="-lwx_gtk2u_core-2.8 -L/usr/lib64 -L/usr/lib ${GTK_LIBS} ${GLIB_LIBS}  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -5608,13 +5656,13 @@ $as_echo "#define HAVE_WXWINDOWS 1" >>confdefs.h
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwx_mac-2.8" >&5
-$as_echo_n "checking for main in -lwx_mac-2.8... " >&6; }
-if test "${ac_cv_lib_wx_mac_2_8_main+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwx_mac_core-2.8" >&5
+$as_echo_n "checking for main in -lwx_mac_core-2.8... " >&6; }
+if test "${ac_cv_lib_wx_mac_core_2_8_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lwx_mac-2.8  $LIBS"
+LIBS="-lwx_mac_core-2.8  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -5628,17 +5676,17 @@ return main ();
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_wx_mac_2_8_main=yes
+  ac_cv_lib_wx_mac_core_2_8_main=yes
 else
-  ac_cv_lib_wx_mac_2_8_main=no
+  ac_cv_lib_wx_mac_core_2_8_main=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wx_mac_2_8_main" >&5
-$as_echo "$ac_cv_lib_wx_mac_2_8_main" >&6; }
-if test "x$ac_cv_lib_wx_mac_2_8_main" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wx_mac_core_2_8_main" >&5
+$as_echo "$ac_cv_lib_wx_mac_core_2_8_main" >&6; }
+if test "x$ac_cv_lib_wx_mac_core_2_8_main" = x""yes; then :
   wxwin=true; wx_mac=true;
 $as_echo "#define HAVE_WXWINDOWS 1" >>confdefs.h
 
@@ -5768,7 +5816,7 @@ if test "${ac_cv_lib_png_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng -lz -lm $LIBS"
+LIBS="-lpng -L/opt/local/lib -lz -lm $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -6428,18 +6476,18 @@ if test "${with_html_dir+set}" = set; then :
 fi
 
 
-if test -n "$cgibindir" -o -n "$cgibinurl" ; then
+if test "x$cgibindir" != "x" -o "x$cgibinurl" != "x" ; then
   cgiprograms="ctsim.cgi ctsim.conf"
 
 fi
 
-if test -n "$html_dir" ; then
+if test "x$html_dir" = "x" ; then
   htmldata=simulate.html
 
 fi
 
 
-if test -n "$html_dir"; then
+if test "x$html_dir" = "x"; then
   USE_HTML_TRUE=
   USE_HTML_FALSE='#'
 else
@@ -6448,20 +6496,20 @@ else
 fi
 
 
-if test -n "$cgibindir" -o -n "$cgibinurl" -o -n "$webdatadir" -o -n "$webdataurl" -o -n "$html_dir" ; then
+if test "x$cgibindir" != "x" -o "x$cgibinurl" != "x" -o "x$webdatadir" != "x" -o "x$webdataurl" != "x" -o "x$html_dir" != "x" ; then
   webenabled=true
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  if test -z "$cgibindir" ; then
+  if test "x$cgibindir" = "x" ; then
     as_fn_error "--with-cgibin-dir not set for web access" "$LINENO" 5
-  elif test -z "$cgibinurl" ; then
+  elif test "x$cgibinurl" = "x" ; then
     as_fn_error "--with-cgibin-url not set for web access" "$LINENO" 5
-  elif test -z "$webdatadir" ; then
+  elif test "x$webdatadir" = "x" ; then
     as_fn_error "--with-webdata-dir not set for web access" "$LINENO" 5
-  elif test -z "$webdataurl" ; then
+  elif test "x$webdataurl" = "x" ; then
     as_fn_error "--with-webdata-url not set for web access" "$LINENO" 5
-  elif test -z "$html_dir" ; then
+  elif test "x$html_dir" = "x" ; then
     as_fn_error "--with-html-dir not set for web access" "$LINENO" 5
   fi
 else
@@ -6471,7 +6519,7 @@ fi
 
 
 
-if test -n "$lamdir"; then
+if test "x$lamdir" != "x"; then
   USE_LAM_TRUE=
   USE_LAM_FALSE='#'
 else
@@ -7206,10 +7254,10 @@ $as_echo "yes" >&6; }
        if test "$debug" = "true"; then
          wxdebug="--debug"
        fi
-      if  "$wx_gtk" ; then
-       ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --libs --version=2.8` -lwx_gtk2u_gl-2.8 `gtk-config --libs` `glib-config --libs glib gmodule gthread`"
-      elif  "$wx_mac" ; then
-        ctlib_graphics="$ctlib_graphics -lwx_mac_gl-2.8"
+      if test "x$wx_gtk" != "x" ; then
+       ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --version=2.8  --libs` -lwx_gtk2u_gl-2.8 ${GTK_LIBS} ${GLIB_LIBS}"
+      elif test "x$wx_mac" != "x" ; then
+        ctlib_graphics="$ctlib_graphics `$wxconfig $wxdebug --version=2.8 --libs` -lwx_macu_gl-2.8"
       fi
     fi
   fi
@@ -7384,7 +7432,7 @@ $as_echo "Using efence" >&6; }
 fi
 
 if test "$wxwin" = "true" ; then
-  if  "$wx_gtk" = "true"  ||  "$wx_mac" = "true"  ; then
+  if test "$wx_gtk" = "true"  -o "$wx_mac" = "true" ; then
     wxcflags=`$wxconfig $wxdebug --cxxflags --version=2.8`
     #wxlibs=`$wxconfig --libs`
   else
@@ -7411,7 +7459,7 @@ LDFLAGS="$LDFLAGS -L../libctsupport -L../libctsim"
 ctlibs="$ctlibs_base -lctsim $ctlib_graphics -lctsupport $ctlibs_tools"
 
 
-if test -n "$lamdir" ; then
+if test "x$lamdir" != "x" ; then
   lamprograms="ctsimtext-lam"
 
   lamdefs="$CFLAGS"