ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure
(Generate patch)

Comparing BasiliskII/src/Unix/configure (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.10 by cebix, 1999-10-25T08:07:50Z

# Line 12 | Line 12 | ac_help=
12   ac_default_prefix=/usr/local
13   # Any additions from configure.in:
14   ac_help="$ac_help
15 <  --enable-dga            use the DGA extension (default)"
15 >  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]"
16   ac_help="$ac_help
17 <  --enable-ui             use GTK user interface (default)"
17 >  --enable-fbdev-dga      use direct frame buffer access via /dev/fb [default=yes]"
18 > ac_help="$ac_help
19 >  --enable-esd            Enlightened Sound Daemon support [default=yes]"
20 > ac_help="$ac_help
21 >  --enable-ui             use GTK user interface [default=yes]"
22   ac_help="$ac_help
23    --with-x                use the X Window System"
24   ac_help="$ac_help
# Line 23 | Line 27 | ac_help="$ac_help
27    --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
28   ac_help="$ac_help
29    --disable-gtktest       Do not try to compile and run a test GTK program"
30 + ac_help="$ac_help
31 +  --with-esd-prefix=PFX   Prefix where ESD is installed (optional)"
32 + ac_help="$ac_help
33 +  --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)"
34 + ac_help="$ac_help
35 +  --disable-esdtest       Do not try to compile and run a test ESD program"
36  
37   # Initialize some variables set by options.
38   # The variables have the same names as the options, with
# Line 536 | Line 546 | fi
546  
547  
548  
549 < WANT_DGA=yes
549 > WANT_XF86_DGA=yes
550 > WANT_FBDEV_DGA=yes
551 > WANT_ESD=yes
552   WANT_UI=yes
553 < # Check whether --enable-dga or --disable-dga was given.
554 < if test "${enable_dga+set}" = set; then
555 <  enableval="$enable_dga"
556 <  WANT_DGA=$enableval
553 > # Check whether --enable-xf86-dga or --disable-xf86-dga was given.
554 > if test "${enable_xf86_dga+set}" = set; then
555 >  enableval="$enable_xf86_dga"
556 >  WANT_XF86_DGA=$enableval
557 > fi
558 >
559 > # Check whether --enable-fbdev-dga or --disable-fbdev-dga was given.
560 > if test "${enable_fbdev_dga+set}" = set; then
561 >  enableval="$enable_fbdev_dga"
562 >  WANT_FBDEV_DGA=$enableval
563 > fi
564 >
565 > # Check whether --enable-esd or --disable-esd was given.
566 > if test "${enable_esd+set}" = set; then
567 >  enableval="$enable_esd"
568 >  WANT_ESD=$enableval
569   fi
570  
571   # Check whether --enable-ui or --disable-ui was given.
# Line 554 | Line 578 | fi
578   # Extract the first word of "gcc", so it can be a program name with args.
579   set dummy gcc; ac_word=$2
580   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
581 < echo "configure:558: checking for $ac_word" >&5
581 > echo "configure:582: checking for $ac_word" >&5
582   if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
583    echo $ac_n "(cached) $ac_c" 1>&6
584   else
# Line 584 | Line 608 | if test -z "$CC"; then
608    # Extract the first word of "cc", so it can be a program name with args.
609   set dummy cc; ac_word=$2
610   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
611 < echo "configure:588: checking for $ac_word" >&5
611 > echo "configure:612: checking for $ac_word" >&5
612   if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
613    echo $ac_n "(cached) $ac_c" 1>&6
614   else
# Line 635 | Line 659 | fi
659        # Extract the first word of "cl", so it can be a program name with args.
660   set dummy cl; ac_word=$2
661   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
662 < echo "configure:639: checking for $ac_word" >&5
662 > echo "configure:663: checking for $ac_word" >&5
663   if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
664    echo $ac_n "(cached) $ac_c" 1>&6
665   else
# Line 667 | Line 691 | fi
691   fi
692  
693   echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
694 < echo "configure:671: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
694 > echo "configure:695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
695  
696   ac_ext=c
697   # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
# Line 678 | Line 702 | cross_compiling=$ac_cv_prog_cc_cross
702  
703   cat > conftest.$ac_ext << EOF
704  
705 < #line 682 "configure"
705 > #line 706 "configure"
706   #include "confdefs.h"
707  
708   main(){return(0);}
709   EOF
710 < if { (eval echo configure:687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
710 > if { (eval echo configure:711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
711    ac_cv_prog_cc_works=yes
712    # If we can't run a trivial program, we are probably using a cross compiler.
713    if (./conftest; exit) 2>/dev/null; then
# Line 709 | Line 733 | if test $ac_cv_prog_cc_works = no; then
733    { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
734   fi
735   echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
736 < echo "configure:713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
736 > echo "configure:737: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
737   echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
738   cross_compiling=$ac_cv_prog_cc_cross
739  
740   echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
741 < echo "configure:718: checking whether we are using GNU C" >&5
741 > echo "configure:742: checking whether we are using GNU C" >&5
742   if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
743    echo $ac_n "(cached) $ac_c" 1>&6
744   else
# Line 723 | Line 747 | else
747    yes;
748   #endif
749   EOF
750 < if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
750 > if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
751    ac_cv_prog_gcc=yes
752   else
753    ac_cv_prog_gcc=no
# Line 742 | Line 766 | ac_test_CFLAGS="${CFLAGS+set}"
766   ac_save_CFLAGS="$CFLAGS"
767   CFLAGS=
768   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
769 < echo "configure:746: checking whether ${CC-cc} accepts -g" >&5
769 > echo "configure:770: checking whether ${CC-cc} accepts -g" >&5
770   if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
771    echo $ac_n "(cached) $ac_c" 1>&6
772   else
# Line 773 | Line 797 | else
797    fi
798   fi
799  
800 + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
801 + echo "configure:802: checking how to run the C preprocessor" >&5
802 + # On Suns, sometimes $CPP names a directory.
803 + if test -n "$CPP" && test -d "$CPP"; then
804 +  CPP=
805 + fi
806 + if test -z "$CPP"; then
807 + if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
808 +  echo $ac_n "(cached) $ac_c" 1>&6
809 + else
810 +    # This must be in double quotes, not single quotes, because CPP may get
811 +  # substituted into the Makefile and "${CC-cc}" will confuse make.
812 +  CPP="${CC-cc} -E"
813 +  # On the NeXT, cc -E runs the code through the compiler's parser,
814 +  # not just through cpp.
815 +  cat > conftest.$ac_ext <<EOF
816 + #line 817 "configure"
817 + #include "confdefs.h"
818 + #include <assert.h>
819 + Syntax Error
820 + EOF
821 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
822 + { (eval echo configure:823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
823 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
824 + if test -z "$ac_err"; then
825 +  :
826 + else
827 +  echo "$ac_err" >&5
828 +  echo "configure: failed program was:" >&5
829 +  cat conftest.$ac_ext >&5
830 +  rm -rf conftest*
831 +  CPP="${CC-cc} -E -traditional-cpp"
832 +  cat > conftest.$ac_ext <<EOF
833 + #line 834 "configure"
834 + #include "confdefs.h"
835 + #include <assert.h>
836 + Syntax Error
837 + EOF
838 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
839 + { (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
840 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
841 + if test -z "$ac_err"; then
842 +  :
843 + else
844 +  echo "$ac_err" >&5
845 +  echo "configure: failed program was:" >&5
846 +  cat conftest.$ac_ext >&5
847 +  rm -rf conftest*
848 +  CPP="${CC-cc} -nologo -E"
849 +  cat > conftest.$ac_ext <<EOF
850 + #line 851 "configure"
851 + #include "confdefs.h"
852 + #include <assert.h>
853 + Syntax Error
854 + EOF
855 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
856 + { (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
857 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
858 + if test -z "$ac_err"; then
859 +  :
860 + else
861 +  echo "$ac_err" >&5
862 +  echo "configure: failed program was:" >&5
863 +  cat conftest.$ac_ext >&5
864 +  rm -rf conftest*
865 +  CPP=/lib/cpp
866 + fi
867 + rm -f conftest*
868 + fi
869 + rm -f conftest*
870 + fi
871 + rm -f conftest*
872 +  ac_cv_prog_CPP="$CPP"
873 + fi
874 +  CPP="$ac_cv_prog_CPP"
875 + else
876 +  ac_cv_prog_CPP="$CPP"
877 + fi
878 + echo "$ac_t""$CPP" 1>&6
879 +
880   for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
881   do
882   # Extract the first word of "$ac_prog", so it can be a program name with args.
883   set dummy $ac_prog; ac_word=$2
884   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
885 < echo "configure:782: checking for $ac_word" >&5
885 > echo "configure:886: checking for $ac_word" >&5
886   if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
887    echo $ac_n "(cached) $ac_c" 1>&6
888   else
# Line 810 | Line 914 | test -n "$CXX" || CXX="gcc"
914  
915  
916   echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
917 < echo "configure:814: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
917 > echo "configure:918: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
918  
919   ac_ext=C
920   # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
# Line 821 | Line 925 | cross_compiling=$ac_cv_prog_cxx_cross
925  
926   cat > conftest.$ac_ext << EOF
927  
928 < #line 825 "configure"
928 > #line 929 "configure"
929   #include "confdefs.h"
930  
931   int main(){return(0);}
932   EOF
933 < if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
933 > if { (eval echo configure:934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
934    ac_cv_prog_cxx_works=yes
935    # If we can't run a trivial program, we are probably using a cross compiler.
936    if (./conftest; exit) 2>/dev/null; then
# Line 852 | Line 956 | if test $ac_cv_prog_cxx_works = no; then
956    { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
957   fi
958   echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
959 < echo "configure:856: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
959 > echo "configure:960: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
960   echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
961   cross_compiling=$ac_cv_prog_cxx_cross
962  
963   echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
964 < echo "configure:861: checking whether we are using GNU C++" >&5
964 > echo "configure:965: checking whether we are using GNU C++" >&5
965   if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
966    echo $ac_n "(cached) $ac_c" 1>&6
967   else
# Line 866 | Line 970 | else
970    yes;
971   #endif
972   EOF
973 < if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
973 > if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
974    ac_cv_prog_gxx=yes
975   else
976    ac_cv_prog_gxx=no
# Line 885 | Line 989 | ac_test_CXXFLAGS="${CXXFLAGS+set}"
989   ac_save_CXXFLAGS="$CXXFLAGS"
990   CXXFLAGS=
991   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
992 < echo "configure:889: checking whether ${CXX-g++} accepts -g" >&5
992 > echo "configure:993: checking whether ${CXX-g++} accepts -g" >&5
993   if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
994    echo $ac_n "(cached) $ac_c" 1>&6
995   else
# Line 916 | Line 1020 | else
1020    fi
1021   fi
1022  
919 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
920 echo "configure:921: checking how to run the C preprocessor" >&5
921 # On Suns, sometimes $CPP names a directory.
922 if test -n "$CPP" && test -d "$CPP"; then
923  CPP=
924 fi
925 if test -z "$CPP"; then
926 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
927  echo $ac_n "(cached) $ac_c" 1>&6
928 else
929    # This must be in double quotes, not single quotes, because CPP may get
930  # substituted into the Makefile and "${CC-cc}" will confuse make.
931  CPP="${CC-cc} -E"
932  # On the NeXT, cc -E runs the code through the compiler's parser,
933  # not just through cpp.
934  cat > conftest.$ac_ext <<EOF
935 #line 936 "configure"
936 #include "confdefs.h"
937 #include <assert.h>
938 Syntax Error
939 EOF
940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
941 { (eval echo configure:942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
943 if test -z "$ac_err"; then
944  :
945 else
946  echo "$ac_err" >&5
947  echo "configure: failed program was:" >&5
948  cat conftest.$ac_ext >&5
949  rm -rf conftest*
950  CPP="${CC-cc} -E -traditional-cpp"
951  cat > conftest.$ac_ext <<EOF
952 #line 953 "configure"
953 #include "confdefs.h"
954 #include <assert.h>
955 Syntax Error
956 EOF
957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
958 { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
960 if test -z "$ac_err"; then
961  :
962 else
963  echo "$ac_err" >&5
964  echo "configure: failed program was:" >&5
965  cat conftest.$ac_ext >&5
966  rm -rf conftest*
967  CPP="${CC-cc} -nologo -E"
968  cat > conftest.$ac_ext <<EOF
969 #line 970 "configure"
970 #include "confdefs.h"
971 #include <assert.h>
972 Syntax Error
973 EOF
974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
975 { (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
977 if test -z "$ac_err"; then
978  :
979 else
980  echo "$ac_err" >&5
981  echo "configure: failed program was:" >&5
982  cat conftest.$ac_ext >&5
983  rm -rf conftest*
984  CPP=/lib/cpp
985 fi
986 rm -f conftest*
987 fi
988 rm -f conftest*
989 fi
990 rm -f conftest*
991  ac_cv_prog_CPP="$CPP"
992 fi
993  CPP="$ac_cv_prog_CPP"
994 else
995  ac_cv_prog_CPP="$CPP"
996 fi
997 echo "$ac_t""$CPP" 1>&6
998
1023   echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1024 < echo "configure:1001: checking whether ${MAKE-make} sets \${MAKE}" >&5
1024 > echo "configure:1025: checking whether ${MAKE-make} sets \${MAKE}" >&5
1025   set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1026   if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1027    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1054 | Line 1078 | ac_configure=$ac_aux_dir/configure # Thi
1078   # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1079   # ./install, which can be erroneously created by make from ./install.sh.
1080   echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1081 < echo "configure:1058: checking for a BSD compatible install" >&5
1081 > echo "configure:1082: checking for a BSD compatible install" >&5
1082   if test -z "$INSTALL"; then
1083   if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1084    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1107 | Line 1131 | test -z "$INSTALL_SCRIPT" && INSTALL_SCR
1131   test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1132  
1133  
1134 + MONSRCS=
1135 + echo $ac_n "checking for mon""... $ac_c" 1>&6
1136 + echo "configure:1137: checking for mon" >&5
1137 + if grep mon_init ../../../mon/src/mon.h >/dev/null 2>/dev/null; then
1138 +  echo "$ac_t""yes" 1>&6
1139 +  DEFINES="$DEFINES -DENABLE_MON=1"
1140 +  MONSRCS="../../../mon/src/mon.cpp ../../../mon/src/mon_6502.cpp ../../../mon/src/mon_68k.cpp ../../../mon/src/mon_8080.cpp ../../../mon/src/mon_cmd.cpp ../../../mon/src/mon_ppc.cpp ../../../mon/src/mon_x86.cpp"
1141 +  CXXFLAGS="$CXXFLAGS -I../../../mon/src"
1142 + else
1143 +  echo "$ac_t""no" 1>&6
1144 +  DEFINES="$DEFINES -DENABLE_MON=0"
1145 + fi
1146 +
1147 + echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6
1148 + echo "configure:1149: checking for sem_init in -lposix4" >&5
1149 + ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'`
1150 + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1151 +  echo $ac_n "(cached) $ac_c" 1>&6
1152 + else
1153 +  ac_save_LIBS="$LIBS"
1154 + LIBS="-lposix4  $LIBS"
1155 + cat > conftest.$ac_ext <<EOF
1156 + #line 1157 "configure"
1157 + #include "confdefs.h"
1158 + /* Override any gcc2 internal prototype to avoid an error.  */
1159 + /* We use char because int might match the return type of a gcc2
1160 +    builtin and then its argument prototype would still apply.  */
1161 + char sem_init();
1162 +
1163 + int main() {
1164 + sem_init()
1165 + ; return 0; }
1166 + EOF
1167 + if { (eval echo configure:1168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1168 +  rm -rf conftest*
1169 +  eval "ac_cv_lib_$ac_lib_var=yes"
1170 + else
1171 +  echo "configure: failed program was:" >&5
1172 +  cat conftest.$ac_ext >&5
1173 +  rm -rf conftest*
1174 +  eval "ac_cv_lib_$ac_lib_var=no"
1175 + fi
1176 + rm -f conftest*
1177 + LIBS="$ac_save_LIBS"
1178 +
1179 + fi
1180 + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1181 +  echo "$ac_t""yes" 1>&6
1182 +    ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1183 +    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1184 +  cat >> confdefs.h <<EOF
1185 + #define $ac_tr_lib 1
1186 + EOF
1187 +
1188 +  LIBS="-lposix4 $LIBS"
1189 +
1190 + else
1191 +  echo "$ac_t""no" 1>&6
1192 + fi
1193 +
1194 +
1195   # If we find X, set shell vars x_includes and x_libraries to the
1196   # paths, otherwise set no_x=yes.
1197   # Uses ac_ vars as temps to allow command line to override cache and checks.
1198   # --without-x overrides everything else, but does not touch the cache.
1199   echo $ac_n "checking for X""... $ac_c" 1>&6
1200 < echo "configure:1116: checking for X" >&5
1200 > echo "configure:1201: checking for X" >&5
1201  
1202   # Check whether --with-x or --without-x was given.
1203   if test "${with_x+set}" = set; then
# Line 1174 | Line 1259 | if test "$ac_x_includes" = NO; then
1259  
1260    # First, try using that file with no special directory specified.
1261   cat > conftest.$ac_ext <<EOF
1262 < #line 1178 "configure"
1262 > #line 1263 "configure"
1263   #include "confdefs.h"
1264   #include <$x_direct_test_include>
1265   EOF
1266   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1267 < { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1267 > { (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1268   ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1269   if test -z "$ac_err"; then
1270    rm -rf conftest*
# Line 1248 | Line 1333 | if test "$ac_x_libraries" = NO; then
1333    ac_save_LIBS="$LIBS"
1334    LIBS="-l$x_direct_test_library $LIBS"
1335   cat > conftest.$ac_ext <<EOF
1336 < #line 1252 "configure"
1336 > #line 1337 "configure"
1337   #include "confdefs.h"
1338  
1339   int main() {
1340   ${x_direct_test_function}()
1341   ; return 0; }
1342   EOF
1343 < if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1343 > if { (eval echo configure:1344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1344    rm -rf conftest*
1345    LIBS="$ac_save_LIBS"
1346   # We can link X programs with no special library path.
# Line 1361 | Line 1446 | else
1446      case "`(uname -sr) 2>/dev/null`" in
1447      "SunOS 5"*)
1448        echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
1449 < echo "configure:1365: checking whether -R must be followed by a space" >&5
1449 > echo "configure:1450: checking whether -R must be followed by a space" >&5
1450        ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
1451        cat > conftest.$ac_ext <<EOF
1452 < #line 1368 "configure"
1452 > #line 1453 "configure"
1453   #include "confdefs.h"
1454  
1455   int main() {
1456  
1457   ; return 0; }
1458   EOF
1459 < if { (eval echo configure:1375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1459 > if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1460    rm -rf conftest*
1461    ac_R_nospace=yes
1462   else
# Line 1387 | Line 1472 | rm -f conftest*
1472        else
1473          LIBS="$ac_xsave_LIBS -R $x_libraries"
1474          cat > conftest.$ac_ext <<EOF
1475 < #line 1391 "configure"
1475 > #line 1476 "configure"
1476   #include "confdefs.h"
1477  
1478   int main() {
1479  
1480   ; return 0; }
1481   EOF
1482 < if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1482 > if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1483    rm -rf conftest*
1484    ac_R_space=yes
1485   else
# Line 1426 | Line 1511 | rm -f conftest*
1511      # libraries were built with DECnet support.  And karl@cs.umb.edu says
1512      # the Alpha needs dnet_stub (dnet does not exist).
1513      echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
1514 < echo "configure:1430: checking for dnet_ntoa in -ldnet" >&5
1514 > echo "configure:1515: checking for dnet_ntoa in -ldnet" >&5
1515   ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1516   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1517    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1434 | Line 1519 | else
1519    ac_save_LIBS="$LIBS"
1520   LIBS="-ldnet  $LIBS"
1521   cat > conftest.$ac_ext <<EOF
1522 < #line 1438 "configure"
1522 > #line 1523 "configure"
1523   #include "confdefs.h"
1524   /* Override any gcc2 internal prototype to avoid an error.  */
1525   /* We use char because int might match the return type of a gcc2
# Line 1445 | Line 1530 | int main() {
1530   dnet_ntoa()
1531   ; return 0; }
1532   EOF
1533 < if { (eval echo configure:1449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1533 > if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1534    rm -rf conftest*
1535    eval "ac_cv_lib_$ac_lib_var=yes"
1536   else
# Line 1467 | Line 1552 | fi
1552  
1553      if test $ac_cv_lib_dnet_dnet_ntoa = no; then
1554        echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
1555 < echo "configure:1471: checking for dnet_ntoa in -ldnet_stub" >&5
1555 > echo "configure:1556: checking for dnet_ntoa in -ldnet_stub" >&5
1556   ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
1557   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1558    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1475 | Line 1560 | else
1560    ac_save_LIBS="$LIBS"
1561   LIBS="-ldnet_stub  $LIBS"
1562   cat > conftest.$ac_ext <<EOF
1563 < #line 1479 "configure"
1563 > #line 1564 "configure"
1564   #include "confdefs.h"
1565   /* Override any gcc2 internal prototype to avoid an error.  */
1566   /* We use char because int might match the return type of a gcc2
# Line 1486 | Line 1571 | int main() {
1571   dnet_ntoa()
1572   ; return 0; }
1573   EOF
1574 < if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1574 > if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1575    rm -rf conftest*
1576    eval "ac_cv_lib_$ac_lib_var=yes"
1577   else
# Line 1515 | Line 1600 | fi
1600      # The nsl library prevents programs from opening the X display
1601      # on Irix 5.2, according to dickey@clark.net.
1602      echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1603 < echo "configure:1519: checking for gethostbyname" >&5
1603 > echo "configure:1604: checking for gethostbyname" >&5
1604   if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1605    echo $ac_n "(cached) $ac_c" 1>&6
1606   else
1607    cat > conftest.$ac_ext <<EOF
1608 < #line 1524 "configure"
1608 > #line 1609 "configure"
1609   #include "confdefs.h"
1610   /* System header to define __stub macros and hopefully few prototypes,
1611      which can conflict with char gethostbyname(); below.  */
# Line 1543 | Line 1628 | gethostbyname();
1628  
1629   ; return 0; }
1630   EOF
1631 < if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1631 > if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1632    rm -rf conftest*
1633    eval "ac_cv_func_gethostbyname=yes"
1634   else
# Line 1564 | Line 1649 | fi
1649  
1650      if test $ac_cv_func_gethostbyname = no; then
1651        echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1652 < echo "configure:1568: checking for gethostbyname in -lnsl" >&5
1652 > echo "configure:1653: checking for gethostbyname in -lnsl" >&5
1653   ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1654   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1655    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1572 | Line 1657 | else
1657    ac_save_LIBS="$LIBS"
1658   LIBS="-lnsl  $LIBS"
1659   cat > conftest.$ac_ext <<EOF
1660 < #line 1576 "configure"
1660 > #line 1661 "configure"
1661   #include "confdefs.h"
1662   /* Override any gcc2 internal prototype to avoid an error.  */
1663   /* We use char because int might match the return type of a gcc2
# Line 1583 | Line 1668 | int main() {
1668   gethostbyname()
1669   ; return 0; }
1670   EOF
1671 < if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1671 > if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1672    rm -rf conftest*
1673    eval "ac_cv_lib_$ac_lib_var=yes"
1674   else
# Line 1613 | Line 1698 | fi
1698      # -lsocket must be given before -lnsl if both are needed.
1699      # We assume that if connect needs -lnsl, so does gethostbyname.
1700      echo $ac_n "checking for connect""... $ac_c" 1>&6
1701 < echo "configure:1617: checking for connect" >&5
1701 > echo "configure:1702: checking for connect" >&5
1702   if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1703    echo $ac_n "(cached) $ac_c" 1>&6
1704   else
1705    cat > conftest.$ac_ext <<EOF
1706 < #line 1622 "configure"
1706 > #line 1707 "configure"
1707   #include "confdefs.h"
1708   /* System header to define __stub macros and hopefully few prototypes,
1709      which can conflict with char connect(); below.  */
# Line 1641 | Line 1726 | connect();
1726  
1727   ; return 0; }
1728   EOF
1729 < if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1729 > if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1730    rm -rf conftest*
1731    eval "ac_cv_func_connect=yes"
1732   else
# Line 1662 | Line 1747 | fi
1747  
1748      if test $ac_cv_func_connect = no; then
1749        echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1750 < echo "configure:1666: checking for connect in -lsocket" >&5
1750 > echo "configure:1751: checking for connect in -lsocket" >&5
1751   ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1752   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1753    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1670 | Line 1755 | else
1755    ac_save_LIBS="$LIBS"
1756   LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
1757   cat > conftest.$ac_ext <<EOF
1758 < #line 1674 "configure"
1758 > #line 1759 "configure"
1759   #include "confdefs.h"
1760   /* Override any gcc2 internal prototype to avoid an error.  */
1761   /* We use char because int might match the return type of a gcc2
# Line 1681 | Line 1766 | int main() {
1766   connect()
1767   ; return 0; }
1768   EOF
1769 < if { (eval echo configure:1685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1769 > if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1770    rm -rf conftest*
1771    eval "ac_cv_lib_$ac_lib_var=yes"
1772   else
# Line 1705 | Line 1790 | fi
1790  
1791      # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
1792      echo $ac_n "checking for remove""... $ac_c" 1>&6
1793 < echo "configure:1709: checking for remove" >&5
1793 > echo "configure:1794: checking for remove" >&5
1794   if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
1795    echo $ac_n "(cached) $ac_c" 1>&6
1796   else
1797    cat > conftest.$ac_ext <<EOF
1798 < #line 1714 "configure"
1798 > #line 1799 "configure"
1799   #include "confdefs.h"
1800   /* System header to define __stub macros and hopefully few prototypes,
1801      which can conflict with char remove(); below.  */
# Line 1733 | Line 1818 | remove();
1818  
1819   ; return 0; }
1820   EOF
1821 < if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1821 > if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1822    rm -rf conftest*
1823    eval "ac_cv_func_remove=yes"
1824   else
# Line 1754 | Line 1839 | fi
1839  
1840      if test $ac_cv_func_remove = no; then
1841        echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
1842 < echo "configure:1758: checking for remove in -lposix" >&5
1842 > echo "configure:1843: checking for remove in -lposix" >&5
1843   ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
1844   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1845    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1762 | Line 1847 | else
1847    ac_save_LIBS="$LIBS"
1848   LIBS="-lposix  $LIBS"
1849   cat > conftest.$ac_ext <<EOF
1850 < #line 1766 "configure"
1850 > #line 1851 "configure"
1851   #include "confdefs.h"
1852   /* Override any gcc2 internal prototype to avoid an error.  */
1853   /* We use char because int might match the return type of a gcc2
# Line 1773 | Line 1858 | int main() {
1858   remove()
1859   ; return 0; }
1860   EOF
1861 < if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1861 > if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1862    rm -rf conftest*
1863    eval "ac_cv_lib_$ac_lib_var=yes"
1864   else
# Line 1797 | Line 1882 | fi
1882  
1883      # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
1884      echo $ac_n "checking for shmat""... $ac_c" 1>&6
1885 < echo "configure:1801: checking for shmat" >&5
1885 > echo "configure:1886: checking for shmat" >&5
1886   if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
1887    echo $ac_n "(cached) $ac_c" 1>&6
1888   else
1889    cat > conftest.$ac_ext <<EOF
1890 < #line 1806 "configure"
1890 > #line 1891 "configure"
1891   #include "confdefs.h"
1892   /* System header to define __stub macros and hopefully few prototypes,
1893      which can conflict with char shmat(); below.  */
# Line 1825 | Line 1910 | shmat();
1910  
1911   ; return 0; }
1912   EOF
1913 < if { (eval echo configure:1829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1913 > if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1914    rm -rf conftest*
1915    eval "ac_cv_func_shmat=yes"
1916   else
# Line 1846 | Line 1931 | fi
1931  
1932      if test $ac_cv_func_shmat = no; then
1933        echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
1934 < echo "configure:1850: checking for shmat in -lipc" >&5
1934 > echo "configure:1935: checking for shmat in -lipc" >&5
1935   ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
1936   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1937    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1854 | Line 1939 | else
1939    ac_save_LIBS="$LIBS"
1940   LIBS="-lipc  $LIBS"
1941   cat > conftest.$ac_ext <<EOF
1942 < #line 1858 "configure"
1942 > #line 1943 "configure"
1943   #include "confdefs.h"
1944   /* Override any gcc2 internal prototype to avoid an error.  */
1945   /* We use char because int might match the return type of a gcc2
# Line 1865 | Line 1950 | int main() {
1950   shmat()
1951   ; return 0; }
1952   EOF
1953 < if { (eval echo configure:1869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1953 > if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1954    rm -rf conftest*
1955    eval "ac_cv_lib_$ac_lib_var=yes"
1956   else
# Line 1898 | Line 1983 | fi
1983    # libraries we check for below, so use a different variable.
1984    #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1985    echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
1986 < echo "configure:1902: checking for IceConnectionNumber in -lICE" >&5
1986 > echo "configure:1987: checking for IceConnectionNumber in -lICE" >&5
1987   ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
1988   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1989    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1906 | Line 1991 | else
1991    ac_save_LIBS="$LIBS"
1992   LIBS="-lICE $X_EXTRA_LIBS $LIBS"
1993   cat > conftest.$ac_ext <<EOF
1994 < #line 1910 "configure"
1994 > #line 1995 "configure"
1995   #include "confdefs.h"
1996   /* Override any gcc2 internal prototype to avoid an error.  */
1997   /* We use char because int might match the return type of a gcc2
# Line 1917 | Line 2002 | int main() {
2002   IceConnectionNumber()
2003   ; return 0; }
2004   EOF
2005 < if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2005 > if { (eval echo configure:2006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2006    rm -rf conftest*
2007    eval "ac_cv_lib_$ac_lib_var=yes"
2008   else
# Line 1944 | Line 2029 | fi
2029   if [ "x$no_x" = "xyes" ]; then
2030    { echo "configure: error: You need X11 to run Basilisk II." 1>&2; exit 1; }
2031   fi
1947
2032   CFLAGS="$CFLAGS $X_CFLAGS"
2033   CXXFLAGS="$CXXFLAGS $X_CFLAGS"
2034   LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
1951 STATICLIBS=
2035  
2036   echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
2037 < echo "configure:1955: checking for pthread_create in -lpthread" >&5
2037 > echo "configure:2038: checking for pthread_create in -lpthread" >&5
2038   ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
2039   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2040    echo $ac_n "(cached) $ac_c" 1>&6
# Line 1959 | Line 2042 | else
2042    ac_save_LIBS="$LIBS"
2043   LIBS="-lpthread  $LIBS"
2044   cat > conftest.$ac_ext <<EOF
2045 < #line 1963 "configure"
2045 > #line 2046 "configure"
2046   #include "confdefs.h"
2047   /* Override any gcc2 internal prototype to avoid an error.  */
2048   /* We use char because int might match the return type of a gcc2
# Line 1970 | Line 2053 | int main() {
2053   pthread_create()
2054   ; return 0; }
2055   EOF
2056 < if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2056 > if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2057    rm -rf conftest*
2058    eval "ac_cv_lib_$ac_lib_var=yes"
2059   else
# Line 1985 | Line 2068 | LIBS="$ac_save_LIBS"
2068   fi
2069   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2070    echo "$ac_t""yes" 1>&6
2071 <  HAVE_PTHREADS=yes
2071 >    ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2072 >    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2073 >  cat >> confdefs.h <<EOF
2074 > #define $ac_tr_lib 1
2075 > EOF
2076 >
2077 >  LIBS="-lpthread $LIBS"
2078 >
2079   else
2080    echo "$ac_t""no" 1>&6
1991 HAVE_PTHREADS=no
1992 fi
2081  
2082 < if [ "x$HAVE_PTHREADS" = "xno" ]; then
2083 <    echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
1996 < echo "configure:1997: checking for pthread_create in -lc_r" >&5
2082 >  echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
2083 > echo "configure:2084: checking for pthread_create in -lc_r" >&5
2084   ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
2085   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2086    echo $ac_n "(cached) $ac_c" 1>&6
# Line 2001 | Line 2088 | else
2088    ac_save_LIBS="$LIBS"
2089   LIBS="-lc_r  $LIBS"
2090   cat > conftest.$ac_ext <<EOF
2091 < #line 2005 "configure"
2091 > #line 2092 "configure"
2092   #include "confdefs.h"
2093   /* Override any gcc2 internal prototype to avoid an error.  */
2094   /* We use char because int might match the return type of a gcc2
# Line 2012 | Line 2099 | int main() {
2099   pthread_create()
2100   ; return 0; }
2101   EOF
2102 < if { (eval echo configure:2016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2102 > if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2103    rm -rf conftest*
2104    eval "ac_cv_lib_$ac_lib_var=yes"
2105   else
# Line 2027 | Line 2114 | LIBS="$ac_save_LIBS"
2114   fi
2115   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2116    echo "$ac_t""yes" 1>&6
2117 <  HAVE_PTHREADS=yes
2117 >    ac_tr_lib=HAVE_LIB`echo c_r | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2118 >    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2119 >  cat >> confdefs.h <<EOF
2120 > #define $ac_tr_lib 1
2121 > EOF
2122 >
2123 >  LIBS="-lc_r $LIBS"
2124 >
2125   else
2126    echo "$ac_t""no" 1>&6
2127 < HAVE_PTHREADS=no
2127 >
2128 >    echo $ac_n "checking for pthread_create in -lPTL""... $ac_c" 1>&6
2129 > echo "configure:2130: checking for pthread_create in -lPTL" >&5
2130 > ac_lib_var=`echo PTL'_'pthread_create | sed 'y%./+-%__p_%'`
2131 > if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2132 >  echo $ac_n "(cached) $ac_c" 1>&6
2133 > else
2134 >  ac_save_LIBS="$LIBS"
2135 > LIBS="-lPTL  $LIBS"
2136 > cat > conftest.$ac_ext <<EOF
2137 > #line 2138 "configure"
2138 > #include "confdefs.h"
2139 > /* Override any gcc2 internal prototype to avoid an error.  */
2140 > /* We use char because int might match the return type of a gcc2
2141 >    builtin and then its argument prototype would still apply.  */
2142 > char pthread_create();
2143 >
2144 > int main() {
2145 > pthread_create()
2146 > ; return 0; }
2147 > EOF
2148 > if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2149 >  rm -rf conftest*
2150 >  eval "ac_cv_lib_$ac_lib_var=yes"
2151 > else
2152 >  echo "configure: failed program was:" >&5
2153 >  cat conftest.$ac_ext >&5
2154 >  rm -rf conftest*
2155 >  eval "ac_cv_lib_$ac_lib_var=no"
2156   fi
2157 + rm -f conftest*
2158 + LIBS="$ac_save_LIBS"
2159 +
2160 + fi
2161 + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2162 +  echo "$ac_t""yes" 1>&6
2163 +    ac_tr_lib=HAVE_LIB`echo PTL | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2164 +    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2165 +  cat >> confdefs.h <<EOF
2166 + #define $ac_tr_lib 1
2167 + EOF
2168 +
2169 +  LIBS="-lPTL $LIBS"
2170  
2036  if [ "x$HAVE_PTHREADS" = "xno" ]; then
2037     { echo "configure: error: You need libpthreads to run Basilisk II." 1>&2; exit 1; }
2038  else
2039     LIBS="$LIBS -lc_r"
2040  fi
2171   else
2172 <  LIBS="$LIBS -lpthread"
2172 >  echo "$ac_t""no" 1>&6
2173 >
2174 >      { echo "configure: error: You need pthreads to run Basilisk II." 1>&2; exit 1; }
2175 >    
2176   fi
2177 < for ac_func in pthread_cancel
2177 >
2178 >  
2179 > fi
2180 >
2181 >
2182 > fi
2183 >
2184 >
2185 > SEMSRCS=
2186 > for ac_func in sem_init
2187   do
2188   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2189 < echo "configure:2048: checking for $ac_func" >&5
2189 > echo "configure:2190: checking for $ac_func" >&5
2190   if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2191    echo $ac_n "(cached) $ac_c" 1>&6
2192   else
2193    cat > conftest.$ac_ext <<EOF
2194 < #line 2053 "configure"
2194 > #line 2195 "configure"
2195   #include "confdefs.h"
2196   /* System header to define __stub macros and hopefully few prototypes,
2197      which can conflict with char $ac_func(); below.  */
# Line 2072 | Line 2214 | $ac_func();
2214  
2215   ; return 0; }
2216   EOF
2217 < if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2217 > if { (eval echo configure:2218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2218    rm -rf conftest*
2219    eval "ac_cv_func_$ac_func=yes"
2220   else
# Line 2093 | Line 2235 | EOF
2235  
2236   else
2237    echo "$ac_t""no" 1>&6
2238 + SEMSRCS=posix_sem.cpp
2239 +
2240   fi
2241   done
2242  
2243  
2244 < if [ "x$WANT_DGA" = "xyes" ]; then
2244 > if [ "x$WANT_XF86_DGA" = "xyes" ]; then
2245    echo $ac_n "checking for XF86DGAQueryExtension in -lXxf86dga""... $ac_c" 1>&6
2246 < echo "configure:2103: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
2246 > echo "configure:2247: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
2247   ac_lib_var=`echo Xxf86dga'_'XF86DGAQueryExtension | sed 'y%./+-%__p_%'`
2248   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2249    echo $ac_n "(cached) $ac_c" 1>&6
# Line 2107 | Line 2251 | else
2251    ac_save_LIBS="$LIBS"
2252   LIBS="-lXxf86dga  $LIBS"
2253   cat > conftest.$ac_ext <<EOF
2254 < #line 2111 "configure"
2254 > #line 2255 "configure"
2255   #include "confdefs.h"
2256   /* Override any gcc2 internal prototype to avoid an error.  */
2257   /* We use char because int might match the return type of a gcc2
# Line 2118 | Line 2262 | int main() {
2262   XF86DGAQueryExtension()
2263   ; return 0; }
2264   EOF
2265 < if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2265 > if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2266    rm -rf conftest*
2267    eval "ac_cv_lib_$ac_lib_var=yes"
2268   else
# Line 2133 | Line 2277 | LIBS="$ac_save_LIBS"
2277   fi
2278   if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2279    echo "$ac_t""yes" 1>&6
2280 <  HAVE_DGA=yes
2280 >  
2281 >    DEFINES="$DEFINES -DENABLE_XF86_DGA=1"
2282 >    LIBS="$LIBS -lXxf86dga"
2283 >    if [ "x$WANT_FBDEV_DGA" = "xyes" ]; then
2284 >      echo "configure: warning: Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga." 1>&2
2285 >      WANT_FBDEV_DGA=no
2286 >    fi
2287 >  
2288   else
2289    echo "$ac_t""no" 1>&6
2290 < HAVE_DGA=no
2290 >
2291 >    echo "configure: warning: Could not find XFree86 DGA extension, ignoring --enable-xf86-dga." 1>&2
2292 >    DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
2293 >  
2294   fi
2295  
2296 <  if [ "x$HAVE_DGA" = "xno" ]; then
2297 <    echo "configure: warning: Could not find DGA extension, ignoring --enable-dga." 1>&2
2298 <  else
2299 <    DEFINES="$DEFINES -DENABLE_DGA=1"
2300 <    LIBS="$LIBS -lXxf86dga"
2301 <  fi
2296 > else
2297 >  DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
2298 > fi
2299 > if [ "x$WANT_FBDEV_DGA" = "xyes" ]; then
2300 >  DEFINES="$DEFINES -DENABLE_FBDEV_DGA=1"
2301 > else
2302 >  DEFINES="$DEFINES -DENABLE_FBDEV_DGA=0"
2303   fi
2304  
2305 + UISRCS=../dummy/prefs_editor_dummy.cpp
2306   if [ "x$WANT_UI" = "xyes" ]; then
2307    # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
2308   if test "${with_gtk_prefix+set}" = set; then
# Line 2189 | Line 2345 | fi
2345    # Extract the first word of "gtk-config", so it can be a program name with args.
2346   set dummy gtk-config; ac_word=$2
2347   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2348 < echo "configure:2193: checking for $ac_word" >&5
2348 > echo "configure:2349: checking for $ac_word" >&5
2349   if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
2350    echo $ac_n "(cached) $ac_c" 1>&6
2351   else
# Line 2224 | Line 2380 | fi
2380  
2381    min_gtk_version=1.2.0
2382    echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
2383 < echo "configure:2228: checking for GTK - version >= $min_gtk_version" >&5
2383 > echo "configure:2384: checking for GTK - version >= $min_gtk_version" >&5
2384    no_gtk=""
2385    if test "$GTK_CONFIG" = "no" ; then
2386      no_gtk=yes
# Line 2247 | Line 2403 | echo "configure:2228: checking for GTK -
2403    echo $ac_n "cross compiling; assumed OK... $ac_c"
2404   else
2405    cat > conftest.$ac_ext <<EOF
2406 < #line 2251 "configure"
2406 > #line 2407 "configure"
2407   #include "confdefs.h"
2408  
2409   #include <gtk/gtk.h>
# Line 2310 | Line 2466 | main ()
2466   }
2467  
2468   EOF
2469 < if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2469 > if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2470   then
2471    :
2472   else
# Line 2328 | Line 2484 | fi
2484    fi
2485    if test "x$no_gtk" = x ; then
2486       echo "$ac_t""yes" 1>&6
2487 <     :    
2487 >    
2488 >    DEFINES="$DEFINES -DENABLE_GTK=1"
2489 >    CFLAGS="$CFLAGS $GTK_CFLAGS"
2490 >    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
2491 >    LIBS="$LIBS $GTK_LIBS"
2492 >    UISRCS=prefs_editor_gtk.cpp
2493 >      
2494    else
2495       echo "$ac_t""no" 1>&6
2496       if test "$GTK_CONFIG" = "no" ; then
# Line 2344 | Line 2506 | fi
2506            CFLAGS="$CFLAGS $GTK_CFLAGS"
2507            LIBS="$LIBS $GTK_LIBS"
2508            cat > conftest.$ac_ext <<EOF
2509 < #line 2348 "configure"
2509 > #line 2510 "configure"
2510   #include "confdefs.h"
2511  
2512   #include <gtk/gtk.h>
# Line 2354 | Line 2516 | int main() {
2516   return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
2517   ; return 0; }
2518   EOF
2519 < if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2519 > if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2520    rm -rf conftest*
2521     echo "*** The test program compiled, but did not run. This usually means"
2522            echo "*** that the run-time linker is not finding GTK or finding the wrong"
# Line 2386 | Line 2548 | rm -f conftest*
2548       fi
2549       GTK_CFLAGS=""
2550       GTK_LIBS=""
2551 <     :
2551 >    
2552 >    echo "configure: warning: Could not find GTK+, disabling user interface." 1>&2
2553 >    WANT_UI=no
2554 >  
2555    fi
2556    
2557    
2558    rm -f conf.gtktest
2559  
2395  if [ "x$no_gtk" = "xyes" ]; then
2396    echo "Did not find gtk+, disabling user interface."
2397    WANT_UI=no
2398    GTK_CFLAGS=
2399    GTK_LIBS=
2400  else
2401    DEFINES="$DEFINES -DENABLE_GTK=1"
2402  fi
2403  CFLAGS="$CFLAGS $GTK_CFLAGS"
2404  CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
2405  LIBS="$LIBS $GTK_LIBS"
2560   fi
2561  
2562 < SEMSRCS=
2563 < for ac_func in sem_init
2564 < do
2565 < echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2566 < echo "configure:2413: checking for $ac_func" >&5
2413 < if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2414 <  echo $ac_n "(cached) $ac_c" 1>&6
2562 > if [ "x$WANT_ESD" = "xyes" ]; then
2563 >  # Check whether --with-esd-prefix or --without-esd-prefix was given.
2564 > if test "${with_esd_prefix+set}" = set; then
2565 >  withval="$with_esd_prefix"
2566 >  esd_prefix="$withval"
2567   else
2568 <  cat > conftest.$ac_ext <<EOF
2569 < #line 2418 "configure"
2418 < #include "confdefs.h"
2419 < /* System header to define __stub macros and hopefully few prototypes,
2420 <    which can conflict with char $ac_func(); below.  */
2421 < #include <assert.h>
2422 < /* Override any gcc2 internal prototype to avoid an error.  */
2423 < /* We use char because int might match the return type of a gcc2
2424 <    builtin and then its argument prototype would still apply.  */
2425 < char $ac_func();
2426 <
2427 < int main() {
2428 <
2429 < /* The GNU C library defines this for functions which it implements
2430 <    to always fail with ENOSYS.  Some functions are actually named
2431 <    something starting with __ and the normal name is an alias.  */
2432 < #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2433 < choke me
2434 < #else
2435 < $ac_func();
2436 < #endif
2568 >  esd_prefix=""
2569 > fi
2570  
2571 < ; return 0; }
2572 < EOF
2573 < if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2574 <  rm -rf conftest*
2442 <  eval "ac_cv_func_$ac_func=yes"
2571 > # Check whether --with-esd-exec-prefix or --without-esd-exec-prefix was given.
2572 > if test "${with_esd_exec_prefix+set}" = set; then
2573 >  withval="$with_esd_exec_prefix"
2574 >  esd_exec_prefix="$withval"
2575   else
2576 <  echo "configure: failed program was:" >&5
2445 <  cat conftest.$ac_ext >&5
2446 <  rm -rf conftest*
2447 <  eval "ac_cv_func_$ac_func=no"
2576 >  esd_exec_prefix=""
2577   fi
2578 < rm -f conftest*
2578 >
2579 > # Check whether --enable-esdtest or --disable-esdtest was given.
2580 > if test "${enable_esdtest+set}" = set; then
2581 >  enableval="$enable_esdtest"
2582 >  :
2583 > else
2584 >  enable_esdtest=yes
2585   fi
2586  
2587 < if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2588 <  echo "$ac_t""yes" 1>&6
2589 <    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2590 <  cat >> confdefs.h <<EOF
2591 < #define $ac_tr_func 1
2592 < EOF
2593 <
2587 >
2588 >  if test x$esd_exec_prefix != x ; then
2589 >     esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
2590 >     if test x${ESD_CONFIG+set} != xset ; then
2591 >        ESD_CONFIG=$esd_exec_prefix/bin/esd-config
2592 >     fi
2593 >  fi
2594 >  if test x$esd_prefix != x ; then
2595 >     esd_args="$esd_args --prefix=$esd_prefix"
2596 >     if test x${ESD_CONFIG+set} != xset ; then
2597 >        ESD_CONFIG=$esd_prefix/bin/esd-config
2598 >     fi
2599 >  fi
2600 >
2601 >  # Extract the first word of "esd-config", so it can be a program name with args.
2602 > set dummy esd-config; ac_word=$2
2603 > echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2604 > echo "configure:2605: checking for $ac_word" >&5
2605 > if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
2606 >  echo $ac_n "(cached) $ac_c" 1>&6
2607 > else
2608 >  case "$ESD_CONFIG" in
2609 >  /*)
2610 >  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
2611 >  ;;
2612 >  ?:/*)                  
2613 >  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
2614 >  ;;
2615 >  *)
2616 >  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2617 >  ac_dummy="$PATH"
2618 >  for ac_dir in $ac_dummy; do
2619 >    test -z "$ac_dir" && ac_dir=.
2620 >    if test -f $ac_dir/$ac_word; then
2621 >      ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
2622 >      break
2623 >    fi
2624 >  done
2625 >  IFS="$ac_save_ifs"
2626 >  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
2627 >  ;;
2628 > esac
2629 > fi
2630 > ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
2631 > if test -n "$ESD_CONFIG"; then
2632 >  echo "$ac_t""$ESD_CONFIG" 1>&6
2633   else
2634    echo "$ac_t""no" 1>&6
2635   fi
2462 done
2636  
2637 < if [ "x$ac_cv_func_sem_init" = "xno" ]; then
2638 <  echo $ac_n "checking for sem_init in -lposix4""... $ac_c" 1>&6
2639 < echo "configure:2467: checking for sem_init in -lposix4" >&5
2640 < ac_lib_var=`echo posix4'_'sem_init | sed 'y%./+-%__p_%'`
2641 < if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2642 <  echo $ac_n "(cached) $ac_c" 1>&6
2637 >  min_esd_version=0.2.8
2638 >  echo $ac_n "checking for ESD - version >= $min_esd_version""... $ac_c" 1>&6
2639 > echo "configure:2640: checking for ESD - version >= $min_esd_version" >&5
2640 >  no_esd=""
2641 >  if test "$ESD_CONFIG" = "no" ; then
2642 >    no_esd=yes
2643 >  else
2644 >    ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
2645 >    ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
2646 >
2647 >    esd_major_version=`$ESD_CONFIG $esd_args --version | \
2648 >           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
2649 >    esd_minor_version=`$ESD_CONFIG $esd_args --version | \
2650 >           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
2651 >    esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
2652 >           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
2653 >    if test "x$enable_esdtest" = "xyes" ; then
2654 >      ac_save_CFLAGS="$CFLAGS"
2655 >      ac_save_LIBS="$LIBS"
2656 >      CFLAGS="$CFLAGS $ESD_CFLAGS"
2657 >      LIBS="$LIBS $ESD_LIBS"
2658 >      rm -f conf.esdtest
2659 >      if test "$cross_compiling" = yes; then
2660 >  echo $ac_n "cross compiling; assumed OK... $ac_c"
2661   else
2662 <  ac_save_LIBS="$LIBS"
2663 < LIBS="-lposix4  $LIBS"
2473 < cat > conftest.$ac_ext <<EOF
2474 < #line 2475 "configure"
2662 >  cat > conftest.$ac_ext <<EOF
2663 > #line 2664 "configure"
2664   #include "confdefs.h"
2476 /* Override any gcc2 internal prototype to avoid an error.  */
2477 /* We use char because int might match the return type of a gcc2
2478    builtin and then its argument prototype would still apply.  */
2479 char sem_init();
2665  
2666 < int main() {
2667 < sem_init()
2668 < ; return 0; }
2666 > #include <stdio.h>
2667 > #include <stdlib.h>
2668 > #include <string.h>
2669 > #include <esd.h>
2670 >
2671 > char*
2672 > my_strdup (char *str)
2673 > {
2674 >  char *new_str;
2675 >  
2676 >  if (str)
2677 >    {
2678 >      new_str = malloc ((strlen (str) + 1) * sizeof(char));
2679 >      strcpy (new_str, str);
2680 >    }
2681 >  else
2682 >    new_str = NULL;
2683 >  
2684 >  return new_str;
2685 > }
2686 >
2687 > int main ()
2688 > {
2689 >  int major, minor, micro;
2690 >  char *tmp_version;
2691 >
2692 >  system ("touch conf.esdtest");
2693 >
2694 >  /* HP/UX 9 (%@#!) writes to sscanf strings */
2695 >  tmp_version = my_strdup("$min_esd_version");
2696 >  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
2697 >     printf("%s, bad version string\n", "$min_esd_version");
2698 >     exit(1);
2699 >   }
2700 >
2701 >   if (($esd_major_version > major) ||
2702 >      (($esd_major_version == major) && ($esd_minor_version > minor)) ||
2703 >      (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
2704 >    {
2705 >      return 0;
2706 >    }
2707 >  else
2708 >    {
2709 >      printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
2710 >      printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
2711 >      printf("*** best to upgrade to the required version.\n");
2712 >      printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
2713 >      printf("*** to point to the correct copy of esd-config, and remove the file\n");
2714 >      printf("*** config.cache before re-running configure\n");
2715 >      return 1;
2716 >    }
2717 > }
2718 >
2719 >
2720   EOF
2721 < if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2722 <  rm -rf conftest*
2723 <  eval "ac_cv_lib_$ac_lib_var=yes"
2721 > if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2722 > then
2723 >  :
2724   else
2725    echo "configure: failed program was:" >&5
2726    cat conftest.$ac_ext >&5
2727 <  rm -rf conftest*
2728 <  eval "ac_cv_lib_$ac_lib_var=no"
2493 < fi
2494 < rm -f conftest*
2495 < LIBS="$ac_save_LIBS"
2496 <
2727 >  rm -fr conftest*
2728 >  no_esd=yes
2729   fi
2730 < if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2499 <  echo "$ac_t""yes" 1>&6
2500 <  HAVE_LIBPOSIX4=yes
2501 < else
2502 <  echo "$ac_t""no" 1>&6
2503 < HAVE_LIBPOSIX4=no
2730 > rm -fr conftest*
2731   fi
2732  
2733 <  if [ "x$HAVE_LIBPOSIX4" = "xno" ]; then
2734 <        for ac_func in semget
2735 < do
2736 < echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2737 < echo "configure:2511: checking for $ac_func" >&5
2738 < if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2739 <  echo $ac_n "(cached) $ac_c" 1>&6
2740 < else
2741 <  cat > conftest.$ac_ext <<EOF
2742 < #line 2516 "configure"
2733 >       CFLAGS="$ac_save_CFLAGS"
2734 >       LIBS="$ac_save_LIBS"
2735 >     fi
2736 >  fi
2737 >  if test "x$no_esd" = x ; then
2738 >     echo "$ac_t""yes" 1>&6
2739 >    
2740 >    DEFINES="$DEFINES -DENABLE_ESD=1"
2741 >    CFLAGS="$CFLAGS $ESD_CFLAGS"
2742 >    CXXFLAGS="$CXXFLAGS $ESD_CFLAGS"
2743 >    LIBS="$LIBS $ESD_LIBS"
2744 >      
2745 >  else
2746 >     echo "$ac_t""no" 1>&6
2747 >     if test "$ESD_CONFIG" = "no" ; then
2748 >       echo "*** The esd-config script installed by ESD could not be found"
2749 >       echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
2750 >       echo "*** your path, or set the ESD_CONFIG environment variable to the"
2751 >       echo "*** full path to esd-config."
2752 >     else
2753 >       if test -f conf.esdtest ; then
2754 >        :
2755 >       else
2756 >          echo "*** Could not run ESD test program, checking why..."
2757 >          CFLAGS="$CFLAGS $ESD_CFLAGS"
2758 >          LIBS="$LIBS $ESD_LIBS"
2759 >          cat > conftest.$ac_ext <<EOF
2760 > #line 2761 "configure"
2761   #include "confdefs.h"
2517 /* System header to define __stub macros and hopefully few prototypes,
2518    which can conflict with char $ac_func(); below.  */
2519 #include <assert.h>
2520 /* Override any gcc2 internal prototype to avoid an error.  */
2521 /* We use char because int might match the return type of a gcc2
2522    builtin and then its argument prototype would still apply.  */
2523 char $ac_func();
2524
2525 int main() {
2762  
2763 < /* The GNU C library defines this for functions which it implements
2764 <    to always fail with ENOSYS.  Some functions are actually named
2529 <    something starting with __ and the normal name is an alias.  */
2530 < #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2531 < choke me
2532 < #else
2533 < $ac_func();
2534 < #endif
2763 > #include <stdio.h>
2764 > #include <esd.h>
2765  
2766 + int main() {
2767 + return 0;
2768   ; return 0; }
2769   EOF
2770 < if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2770 > if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2771    rm -rf conftest*
2772 <  eval "ac_cv_func_$ac_func=yes"
2772 >   echo "*** The test program compiled, but did not run. This usually means"
2773 >          echo "*** that the run-time linker is not finding ESD or finding the wrong"
2774 >          echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
2775 >          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
2776 >          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
2777 >          echo "*** is required on your system"
2778 >          echo "***"
2779 >          echo "*** If you have an old version installed, it is best to remove it, although"
2780 >          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
2781   else
2782    echo "configure: failed program was:" >&5
2783    cat conftest.$ac_ext >&5
2784    rm -rf conftest*
2785 <  eval "ac_cv_func_$ac_func=no"
2785 >   echo "*** The test program failed to compile or link. See the file config.log for the"
2786 >          echo "*** exact error that occured. This usually means ESD was incorrectly installed"
2787 >          echo "*** or that you have moved ESD since it was installed. In the latter case, you"
2788 >          echo "*** may want to edit the esd-config script: $ESD_CONFIG"
2789   fi
2790   rm -f conftest*
2791 < fi
2792 <
2793 < if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2794 <  echo "$ac_t""yes" 1>&6
2795 <    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2796 <  cat >> confdefs.h <<EOF
2797 < #define $ac_tr_func 1
2798 < EOF
2799 <
2800 < else
2558 <  echo "$ac_t""no" 1>&6
2559 < fi
2560 < done
2561 <
2562 <    if [ "x$ac_cv_func_semget" = "xno" ]; then
2563 <      { echo "configure: error: You need POSIX.4 semaphores to run Basilisk II." 1>&2; exit 1; }
2564 <    else
2565 <      SEMSRCS="posix_sem.cpp"
2566 <    fi
2567 <  else
2568 <    LIBS="$LIBS -lposix4"
2791 >          CFLAGS="$ac_save_CFLAGS"
2792 >          LIBS="$ac_save_LIBS"
2793 >       fi
2794 >     fi
2795 >     ESD_CFLAGS=""
2796 >     ESD_LIBS=""
2797 >    
2798 >    echo "configure: warning: Could not find ESD, disabling ESD support." 1>&2
2799 >    WANT_ESD=no
2800 >  
2801    fi
2802 +  
2803 +  
2804 +  rm -f conf.esdtest
2805 +
2806   fi
2807  
2808   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2809 < echo "configure:2574: checking for ANSI C header files" >&5
2809 > echo "configure:2810: checking for ANSI C header files" >&5
2810   if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2811    echo $ac_n "(cached) $ac_c" 1>&6
2812   else
2813    cat > conftest.$ac_ext <<EOF
2814 < #line 2579 "configure"
2814 > #line 2815 "configure"
2815   #include "confdefs.h"
2816   #include <stdlib.h>
2817   #include <stdarg.h>
# Line 2583 | Line 2819 | else
2819   #include <float.h>
2820   EOF
2821   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2822 < { (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2822 > { (eval echo configure:2823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2823   ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2824   if test -z "$ac_err"; then
2825    rm -rf conftest*
# Line 2600 | Line 2836 | rm -f conftest*
2836   if test $ac_cv_header_stdc = yes; then
2837    # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2838   cat > conftest.$ac_ext <<EOF
2839 < #line 2604 "configure"
2839 > #line 2840 "configure"
2840   #include "confdefs.h"
2841   #include <string.h>
2842   EOF
# Line 2618 | Line 2854 | fi
2854   if test $ac_cv_header_stdc = yes; then
2855    # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2856   cat > conftest.$ac_ext <<EOF
2857 < #line 2622 "configure"
2857 > #line 2858 "configure"
2858   #include "confdefs.h"
2859   #include <stdlib.h>
2860   EOF
# Line 2639 | Line 2875 | if test "$cross_compiling" = yes; then
2875    :
2876   else
2877    cat > conftest.$ac_ext <<EOF
2878 < #line 2643 "configure"
2878 > #line 2879 "configure"
2879   #include "confdefs.h"
2880   #include <ctype.h>
2881   #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# Line 2650 | Line 2886 | if (XOR (islower (i), ISLOWER (i)) || to
2886   exit (0); }
2887  
2888   EOF
2889 < if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2889 > if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2890   then
2891    :
2892   else
# Line 2677 | Line 2913 | for ac_hdr in unistd.h fcntl.h sys/time.
2913   do
2914   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2915   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2916 < echo "configure:2681: checking for $ac_hdr" >&5
2916 > echo "configure:2917: checking for $ac_hdr" >&5
2917   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2918    echo $ac_n "(cached) $ac_c" 1>&6
2919   else
2920    cat > conftest.$ac_ext <<EOF
2921 < #line 2686 "configure"
2921 > #line 2922 "configure"
2922   #include "confdefs.h"
2923   #include <$ac_hdr>
2924   EOF
2925   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2926 < { (eval echo configure:2691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2926 > { (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2927   ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2928   if test -z "$ac_err"; then
2929    rm -rf conftest*
# Line 2715 | Line 2951 | done
2951  
2952  
2953   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2954 < echo "configure:2719: checking whether byte ordering is bigendian" >&5
2954 > echo "configure:2955: checking whether byte ordering is bigendian" >&5
2955   if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2956    echo $ac_n "(cached) $ac_c" 1>&6
2957   else
2958    ac_cv_c_bigendian=unknown
2959   # See if sys/param.h defines the BYTE_ORDER macro.
2960   cat > conftest.$ac_ext <<EOF
2961 < #line 2726 "configure"
2961 > #line 2962 "configure"
2962   #include "confdefs.h"
2963   #include <sys/types.h>
2964   #include <sys/param.h>
# Line 2733 | Line 2969 | int main() {
2969   #endif
2970   ; return 0; }
2971   EOF
2972 < if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2972 > if { (eval echo configure:2973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2973    rm -rf conftest*
2974    # It does; now see whether it defined to BIG_ENDIAN or not.
2975   cat > conftest.$ac_ext <<EOF
2976 < #line 2741 "configure"
2976 > #line 2977 "configure"
2977   #include "confdefs.h"
2978   #include <sys/types.h>
2979   #include <sys/param.h>
# Line 2748 | Line 2984 | int main() {
2984   #endif
2985   ; return 0; }
2986   EOF
2987 < if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2987 > if { (eval echo configure:2988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2988    rm -rf conftest*
2989    ac_cv_c_bigendian=yes
2990   else
# Line 2768 | Line 3004 | if test "$cross_compiling" = yes; then
3004      { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3005   else
3006    cat > conftest.$ac_ext <<EOF
3007 < #line 2772 "configure"
3007 > #line 3008 "configure"
3008   #include "confdefs.h"
3009   main () {
3010    /* Are we little or big endian?  From Harbison&Steele.  */
# Line 2781 | Line 3017 | main () {
3017    exit (u.c[sizeof (long) - 1] == 1);
3018   }
3019   EOF
3020 < if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3020 > if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3021   then
3022    ac_cv_c_bigendian=no
3023   else
# Line 2805 | Line 3041 | EOF
3041   fi
3042  
3043   echo $ac_n "checking for working const""... $ac_c" 1>&6
3044 < echo "configure:2809: checking for working const" >&5
3044 > echo "configure:3045: checking for working const" >&5
3045   if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3046    echo $ac_n "(cached) $ac_c" 1>&6
3047   else
3048    cat > conftest.$ac_ext <<EOF
3049 < #line 2814 "configure"
3049 > #line 3050 "configure"
3050   #include "confdefs.h"
3051  
3052   int main() {
# Line 2859 | Line 3095 | ccp = (char const *const *) p;
3095  
3096   ; return 0; }
3097   EOF
3098 < if { (eval echo configure:2863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3098 > if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3099    rm -rf conftest*
3100    ac_cv_c_const=yes
3101   else
# Line 2880 | Line 3116 | EOF
3116   fi
3117  
3118   echo $ac_n "checking for inline""... $ac_c" 1>&6
3119 < echo "configure:2884: checking for inline" >&5
3119 > echo "configure:3120: checking for inline" >&5
3120   if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3121    echo $ac_n "(cached) $ac_c" 1>&6
3122   else
3123    ac_cv_c_inline=no
3124   for ac_kw in inline __inline__ __inline; do
3125    cat > conftest.$ac_ext <<EOF
3126 < #line 2891 "configure"
3126 > #line 3127 "configure"
3127   #include "confdefs.h"
3128  
3129   int main() {
3130   } $ac_kw foo() {
3131   ; return 0; }
3132   EOF
3133 < if { (eval echo configure:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3133 > if { (eval echo configure:3134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3134    rm -rf conftest*
3135    ac_cv_c_inline=$ac_kw; break
3136   else
# Line 2920 | Line 3156 | EOF
3156   esac
3157  
3158   echo $ac_n "checking size of short""... $ac_c" 1>&6
3159 < echo "configure:2924: checking size of short" >&5
3159 > echo "configure:3160: checking size of short" >&5
3160   if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3161    echo $ac_n "(cached) $ac_c" 1>&6
3162   else
# Line 2928 | Line 3164 | else
3164    ac_cv_sizeof_short=2
3165   else
3166    cat > conftest.$ac_ext <<EOF
3167 < #line 2932 "configure"
3167 > #line 3168 "configure"
3168   #include "confdefs.h"
3169   #include <stdio.h>
3170   main()
# Line 2939 | Line 3175 | main()
3175    exit(0);
3176   }
3177   EOF
3178 < if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3178 > if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3179   then
3180    ac_cv_sizeof_short=`cat conftestval`
3181   else
# Line 2959 | Line 3195 | EOF
3195  
3196  
3197   echo $ac_n "checking size of int""... $ac_c" 1>&6
3198 < echo "configure:2963: checking size of int" >&5
3198 > echo "configure:3199: checking size of int" >&5
3199   if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
3200    echo $ac_n "(cached) $ac_c" 1>&6
3201   else
# Line 2967 | Line 3203 | else
3203    ac_cv_sizeof_int=4
3204   else
3205    cat > conftest.$ac_ext <<EOF
3206 < #line 2971 "configure"
3206 > #line 3207 "configure"
3207   #include "confdefs.h"
3208   #include <stdio.h>
3209   main()
# Line 2978 | Line 3214 | main()
3214    exit(0);
3215   }
3216   EOF
3217 < if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3217 > if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3218   then
3219    ac_cv_sizeof_int=`cat conftestval`
3220   else
# Line 2998 | Line 3234 | EOF
3234  
3235  
3236   echo $ac_n "checking size of long""... $ac_c" 1>&6
3237 < echo "configure:3002: checking size of long" >&5
3237 > echo "configure:3238: checking size of long" >&5
3238   if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
3239    echo $ac_n "(cached) $ac_c" 1>&6
3240   else
# Line 3006 | Line 3242 | else
3242    ac_cv_sizeof_long=4
3243   else
3244    cat > conftest.$ac_ext <<EOF
3245 < #line 3010 "configure"
3245 > #line 3246 "configure"
3246   #include "confdefs.h"
3247   #include <stdio.h>
3248   main()
# Line 3017 | Line 3253 | main()
3253    exit(0);
3254   }
3255   EOF
3256 < if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3256 > if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3257   then
3258    ac_cv_sizeof_long=`cat conftestval`
3259   else
# Line 3037 | Line 3273 | EOF
3273  
3274  
3275   echo $ac_n "checking size of long long""... $ac_c" 1>&6
3276 < echo "configure:3041: checking size of long long" >&5
3276 > echo "configure:3277: checking size of long long" >&5
3277   if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
3278    echo $ac_n "(cached) $ac_c" 1>&6
3279   else
# Line 3045 | Line 3281 | else
3281    ac_cv_sizeof_long_long=8
3282   else
3283    cat > conftest.$ac_ext <<EOF
3284 < #line 3049 "configure"
3284 > #line 3285 "configure"
3285   #include "confdefs.h"
3286   #include <stdio.h>
3287   main()
# Line 3056 | Line 3292 | main()
3292    exit(0);
3293   }
3294   EOF
3295 < if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3295 > if { (eval echo configure:3296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3296   then
3297    ac_cv_sizeof_long_long=`cat conftestval`
3298   else
# Line 3076 | Line 3312 | EOF
3312  
3313  
3314   echo $ac_n "checking for off_t""... $ac_c" 1>&6
3315 < echo "configure:3080: checking for off_t" >&5
3315 > echo "configure:3316: checking for off_t" >&5
3316   if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3317    echo $ac_n "(cached) $ac_c" 1>&6
3318   else
3319    cat > conftest.$ac_ext <<EOF
3320 < #line 3085 "configure"
3320 > #line 3321 "configure"
3321   #include "confdefs.h"
3322   #include <sys/types.h>
3323   #if STDC_HEADERS
# Line 3109 | Line 3345 | EOF
3345   fi
3346  
3347   echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3348 < echo "configure:3113: checking for loff_t" >&5
3348 > echo "configure:3349: checking for loff_t" >&5
3349   if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3350    echo $ac_n "(cached) $ac_c" 1>&6
3351   else
3352    cat > conftest.$ac_ext <<EOF
3353 < #line 3118 "configure"
3353 > #line 3354 "configure"
3354   #include "confdefs.h"
3355   #include <sys/types.h>
3356   #if STDC_HEADERS
# Line 3142 | Line 3378 | EOF
3378   fi
3379  
3380   echo $ac_n "checking for size_t""... $ac_c" 1>&6
3381 < echo "configure:3146: checking for size_t" >&5
3381 > echo "configure:3382: checking for size_t" >&5
3382   if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3383    echo $ac_n "(cached) $ac_c" 1>&6
3384   else
3385    cat > conftest.$ac_ext <<EOF
3386 < #line 3151 "configure"
3386 > #line 3387 "configure"
3387   #include "confdefs.h"
3388   #include <sys/types.h>
3389   #if STDC_HEADERS
# Line 3175 | Line 3411 | EOF
3411   fi
3412  
3413   echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3414 < echo "configure:3179: checking whether time.h and sys/time.h may both be included" >&5
3414 > echo "configure:3415: checking whether time.h and sys/time.h may both be included" >&5
3415   if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3416    echo $ac_n "(cached) $ac_c" 1>&6
3417   else
3418    cat > conftest.$ac_ext <<EOF
3419 < #line 3184 "configure"
3419 > #line 3420 "configure"
3420   #include "confdefs.h"
3421   #include <sys/types.h>
3422   #include <sys/time.h>
# Line 3189 | Line 3425 | int main() {
3425   struct tm *tp;
3426   ; return 0; }
3427   EOF
3428 < if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3428 > if { (eval echo configure:3429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3429    rm -rf conftest*
3430    ac_cv_header_time=yes
3431   else
# Line 3210 | Line 3446 | EOF
3446   fi
3447  
3448   echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3449 < echo "configure:3214: checking whether struct tm is in sys/time.h or time.h" >&5
3449 > echo "configure:3450: checking whether struct tm is in sys/time.h or time.h" >&5
3450   if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3451    echo $ac_n "(cached) $ac_c" 1>&6
3452   else
3453    cat > conftest.$ac_ext <<EOF
3454 < #line 3219 "configure"
3454 > #line 3455 "configure"
3455   #include "confdefs.h"
3456   #include <sys/types.h>
3457   #include <time.h>
# Line 3223 | Line 3459 | int main() {
3459   struct tm *tp; tp->tm_sec;
3460   ; return 0; }
3461   EOF
3462 < if { (eval echo configure:3227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3462 > if { (eval echo configure:3463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3463    rm -rf conftest*
3464    ac_cv_struct_tm=time.h
3465   else
# Line 3247 | Line 3483 | fi
3483   for ac_func in strdup cfmakeraw
3484   do
3485   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3486 < echo "configure:3251: checking for $ac_func" >&5
3486 > echo "configure:3487: checking for $ac_func" >&5
3487   if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3488    echo $ac_n "(cached) $ac_c" 1>&6
3489   else
3490    cat > conftest.$ac_ext <<EOF
3491 < #line 3256 "configure"
3491 > #line 3492 "configure"
3492   #include "confdefs.h"
3493   /* System header to define __stub macros and hopefully few prototypes,
3494      which can conflict with char $ac_func(); below.  */
# Line 3275 | Line 3511 | $ac_func();
3511  
3512   ; return 0; }
3513   EOF
3514 < if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3514 > if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3515    rm -rf conftest*
3516    eval "ac_cv_func_$ac_func=yes"
3517   else
# Line 3302 | Line 3538 | done
3538   for ac_func in nanosleep clock_gettime timer_create
3539   do
3540   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3541 < echo "configure:3306: checking for $ac_func" >&5
3541 > echo "configure:3542: checking for $ac_func" >&5
3542 > if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3543 >  echo $ac_n "(cached) $ac_c" 1>&6
3544 > else
3545 >  cat > conftest.$ac_ext <<EOF
3546 > #line 3547 "configure"
3547 > #include "confdefs.h"
3548 > /* System header to define __stub macros and hopefully few prototypes,
3549 >    which can conflict with char $ac_func(); below.  */
3550 > #include <assert.h>
3551 > /* Override any gcc2 internal prototype to avoid an error.  */
3552 > /* We use char because int might match the return type of a gcc2
3553 >    builtin and then its argument prototype would still apply.  */
3554 > char $ac_func();
3555 >
3556 > int main() {
3557 >
3558 > /* The GNU C library defines this for functions which it implements
3559 >    to always fail with ENOSYS.  Some functions are actually named
3560 >    something starting with __ and the normal name is an alias.  */
3561 > #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3562 > choke me
3563 > #else
3564 > $ac_func();
3565 > #endif
3566 >
3567 > ; return 0; }
3568 > EOF
3569 > if { (eval echo configure:3570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3570 >  rm -rf conftest*
3571 >  eval "ac_cv_func_$ac_func=yes"
3572 > else
3573 >  echo "configure: failed program was:" >&5
3574 >  cat conftest.$ac_ext >&5
3575 >  rm -rf conftest*
3576 >  eval "ac_cv_func_$ac_func=no"
3577 > fi
3578 > rm -f conftest*
3579 > fi
3580 >
3581 > if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3582 >  echo "$ac_t""yes" 1>&6
3583 >    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3584 >  cat >> confdefs.h <<EOF
3585 > #define $ac_tr_func 1
3586 > EOF
3587 >
3588 > else
3589 >  echo "$ac_t""no" 1>&6
3590 > fi
3591 > done
3592 >
3593 > for ac_func in pthread_cancel
3594 > do
3595 > echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3596 > echo "configure:3597: checking for $ac_func" >&5
3597   if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3598    echo $ac_n "(cached) $ac_c" 1>&6
3599   else
3600    cat > conftest.$ac_ext <<EOF
3601 < #line 3311 "configure"
3601 > #line 3602 "configure"
3602   #include "confdefs.h"
3603   /* System header to define __stub macros and hopefully few prototypes,
3604      which can conflict with char $ac_func(); below.  */
# Line 3330 | Line 3621 | $ac_func();
3621  
3622   ; return 0; }
3623   EOF
3624 < if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3624 > if { (eval echo configure:3625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3625    rm -rf conftest*
3626    eval "ac_cv_func_$ac_func=yes"
3627   else
# Line 3359 | Line 3650 | SYSSRCS="../dummy/ether_dummy.cpp ../dum
3650   if MACHINE=`uname -a 2>/dev/null`; then
3651    case "$MACHINE" in
3652    Linux*)
3653 <    SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp Linux/audio_linux.cpp"
3653 >    SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp audio_oss_esd.cpp"
3654      ;;
3655    FreeBSD*3.*)
3656          echo $ac_n "checking for cam_open_btl in -lcam""... $ac_c" 1>&6
3657 < echo "configure:3367: checking for cam_open_btl in -lcam" >&5
3657 > echo "configure:3658: checking for cam_open_btl in -lcam" >&5
3658   ac_lib_var=`echo cam'_'cam_open_btl | sed 'y%./+-%__p_%'`
3659   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3660    echo $ac_n "(cached) $ac_c" 1>&6
# Line 3371 | Line 3662 | else
3662    ac_save_LIBS="$LIBS"
3663   LIBS="-lcam  $LIBS"
3664   cat > conftest.$ac_ext <<EOF
3665 < #line 3375 "configure"
3665 > #line 3666 "configure"
3666   #include "confdefs.h"
3667   /* Override any gcc2 internal prototype to avoid an error.  */
3668   /* We use char because int might match the return type of a gcc2
# Line 3382 | Line 3673 | int main() {
3673   cam_open_btl()
3674   ; return 0; }
3675   EOF
3676 < if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3676 > if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3677    rm -rf conftest*
3678    eval "ac_cv_lib_$ac_lib_var=yes"
3679   else
# Line 3408 | Line 3699 | fi
3699      else
3700              ac_safe=`echo "/sys/cam/cam.h" | sed 'y%./+-%__p_%'`
3701   echo $ac_n "checking for /sys/cam/cam.h""... $ac_c" 1>&6
3702 < echo "configure:3412: checking for /sys/cam/cam.h" >&5
3702 > echo "configure:3703: checking for /sys/cam/cam.h" >&5
3703   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3704    echo $ac_n "(cached) $ac_c" 1>&6
3705   else
3706    cat > conftest.$ac_ext <<EOF
3707 < #line 3417 "configure"
3707 > #line 3708 "configure"
3708   #include "confdefs.h"
3709   #include </sys/cam/cam.h>
3710   EOF
3711   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3712 < { (eval echo configure:3422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3712 > { (eval echo configure:3713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3713   ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3714   if test -z "$ac_err"; then
3715    rm -rf conftest*
# Line 3442 | Line 3733 | fi
3733        if [ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]; then
3734                          { echo "configure: error: Cannot find kernel includes for CAM library." 1>&2; exit 1; }
3735        fi
3736 <      SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp"
3736 >      SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp audio_oss_esd.cpp"
3737        CXXFLAGS="$CXXFLAGS -I/sys"
3738        CFLAGS="$CFLAGS -I/sys"
3739        LIBS="$LIBS -lcam"
# Line 3451 | Line 3742 | fi
3742      ;;
3743    FreeBSD*)
3744          echo $ac_n "checking for scsi_open in -lscsi""... $ac_c" 1>&6
3745 < echo "configure:3455: checking for scsi_open in -lscsi" >&5
3745 > echo "configure:3746: checking for scsi_open in -lscsi" >&5
3746   ac_lib_var=`echo scsi'_'scsi_open | sed 'y%./+-%__p_%'`
3747   if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3748    echo $ac_n "(cached) $ac_c" 1>&6
# Line 3459 | Line 3750 | else
3750    ac_save_LIBS="$LIBS"
3751   LIBS="-lscsi  $LIBS"
3752   cat > conftest.$ac_ext <<EOF
3753 < #line 3463 "configure"
3753 > #line 3754 "configure"
3754   #include "confdefs.h"
3755   /* Override any gcc2 internal prototype to avoid an error.  */
3756   /* We use char because int might match the return type of a gcc2
# Line 3470 | Line 3761 | int main() {
3761   scsi_open()
3762   ; return 0; }
3763   EOF
3764 < if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3764 > if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3765    rm -rf conftest*
3766    eval "ac_cv_lib_$ac_lib_var=yes"
3767   else
# Line 3496 | Line 3787 | fi
3787      else
3788              ac_safe=`echo "scsi.h sys/scsiio.h" | sed 'y%./+-%__p_%'`
3789   echo $ac_n "checking for scsi.h sys/scsiio.h""... $ac_c" 1>&6
3790 < echo "configure:3500: checking for scsi.h sys/scsiio.h" >&5
3790 > echo "configure:3791: checking for scsi.h sys/scsiio.h" >&5
3791   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3792    echo $ac_n "(cached) $ac_c" 1>&6
3793   else
3794    cat > conftest.$ac_ext <<EOF
3795 < #line 3505 "configure"
3795 > #line 3796 "configure"
3796   #include "confdefs.h"
3797   #include <scsi.h sys/scsiio.h>
3798   EOF
3799   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3800 < { (eval echo configure:3510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3800 > { (eval echo configure:3801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3801   ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3802   if test -z "$ac_err"; then
3803    rm -rf conftest*
# Line 3545 | Line 3836 | fi
3836      LIBS="$LIBS -lm"
3837      ;;
3838    esac
3548  if [ "x$WANT_UI" = "xyes" ]; then
3549    SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp"
3550  else
3551    SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp"
3552  fi
3553 fi
3554 if [ "x$SEMSRCS" != "x" ]; then
3555  SYSSRCS="$SYSSRCS $SEMSRCS"
3839   fi
3840 <
3558 < CPUINCLUDES="-I../uae_cpu"
3559 < CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp ../uae_cpu/fpp.cpp cpustbl.cpp cpudefs.cpp"
3840 > SYSSRCS="$SYSSRCS $SEMSRCS $UISRCS $MONSRCS"
3841  
3842   HAVE_I386=no
3843   echo $ac_n "checking for x86 target CPU""... $ac_c" 1>&6
3844 < echo "configure:3564: checking for x86 target CPU" >&5
3844 > echo "configure:3845: checking for x86 target CPU" >&5
3845   cat > conftest.$ac_ext <<EOF
3846 < #line 3566 "configure"
3846 > #line 3847 "configure"
3847   #include "confdefs.h"
3848  
3849   #ifdef __i386__
# Line 3581 | Line 3862 | fi
3862   rm -f conftest*
3863  
3864  
3865 + HAVE_SPARC=no
3866 + echo $ac_n "checking for SPARC target CPU""... $ac_c" 1>&6
3867 + echo "configure:3868: checking for SPARC target CPU" >&5
3868 + cat > conftest.$ac_ext <<EOF
3869 + #line 3870 "configure"
3870 + #include "confdefs.h"
3871 +
3872 + #ifdef __sparc__
3873 +  yes
3874 + #endif
3875 +
3876 + EOF
3877 + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3878 +  egrep "yes" >/dev/null 2>&1; then
3879 +  rm -rf conftest*
3880 +  echo "$ac_t""yes" 1>&6; HAVE_SPARC=yes
3881 + else
3882 +  rm -rf conftest*
3883 +  echo "$ac_t""no" 1>&6
3884 + fi
3885 + rm -f conftest*
3886 +
3887 +
3888   HAVE_GAS=no
3889   echo $ac_n "checking for GAS .p2align feature""... $ac_c" 1>&6
3890 < echo "configure:3587: checking for GAS .p2align feature" >&5
3890 > echo "configure:3891: checking for GAS .p2align feature" >&5
3891   cat >conftest.S << EOF
3892          .text
3893          .p2align 5
# Line 3593 | Line 3897 | echo "$ac_t""$HAVE_GAS" 1>&6
3897  
3898   HAVE_GCC27=no
3899   echo $ac_n "checking for GCC 2.7 or higher""... $ac_c" 1>&6
3900 < echo "configure:3597: checking for GCC 2.7 or higher" >&5
3900 > echo "configure:3901: checking for GCC 2.7 or higher" >&5
3901   cat > conftest.$ac_ext <<EOF
3902 < #line 3599 "configure"
3902 > #line 3903 "configure"
3903   #include "confdefs.h"
3904   #if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
3905    yes
# Line 3618 | Line 3922 | if [ "x$HAVE_GCC27" = "xyes" ]; then
3922    CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
3923   fi
3924  
3925 + CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
3926   if [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]; then
3927 <  DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
3927 >    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
3928    if [ "x$HAVE_GAS" = "xyes" ]; then
3929      DEFINES="$DEFINES -DX86_ASSEMBLY"
3930 <    CPUSRCS="$CPUSRCS cpufast.s"
3626 <  else
3627 <    CPUSRCS="$CPUSRCS cpuemu.cpp"
3930 >    CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
3931    fi
3932 < else
3933 <  CPUSRCS="$CPUSRCS cpuemu.cpp"
3932 > elif [ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]; then
3933 >    case "$MACHINE" in
3934 >  SunOS*)
3935 >    echo $ac_n "checking SPARC CPU architecture""... $ac_c" 1>&6
3936 > echo "configure:3937: checking SPARC CPU architecture" >&5
3937 >    SPARC_TYPE=`Solaris/which_sparc`
3938 >    echo "$ac_t""$SPARC_TYPE" 1>&6
3939 >    case "$SPARC_TYPE" in
3940 >    SPARC_V8)
3941 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY"
3942 >      CFLAGS="$CFLAGS -Wa,-Av8"
3943 >      CXXFLAGS="$CXXFLAGS -Wa,-Av8"
3944 >      ;;
3945 >    SPARC_V9)
3946 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY"
3947 >      CFLAGS="$CFLAGS -Wa,-Av9"
3948 >      CXXFLAGS="$CXXFLAGS -Wa,-Av9"
3949 >      ;;
3950 >    esac
3951 >    ;;
3952 >  esac
3953   fi
3954  
3955 + CPUINCLUDES="-I../uae_cpu"
3956 + CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp ../uae_cpu/fpp.cpp cpustbl.cpp cpudefs.cpp $CPUSRCS"
3957  
3958  
3959  
# Line 3769 | Line 4093 | s%@oldincludedir@%$oldincludedir%g
4093   s%@infodir@%$infodir%g
4094   s%@mandir@%$mandir%g
4095   s%@CC@%$CC%g
3772 s%@CXX@%$CXX%g
4096   s%@CPP@%$CPP%g
4097 + s%@CXX@%$CXX%g
4098   s%@SET_MAKE@%$SET_MAKE%g
4099   s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4100   s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
# Line 3782 | Line 4106 | s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4106   s%@GTK_CONFIG@%$GTK_CONFIG%g
4107   s%@GTK_CFLAGS@%$GTK_CFLAGS%g
4108   s%@GTK_LIBS@%$GTK_LIBS%g
4109 + s%@ESD_CONFIG@%$ESD_CONFIG%g
4110 + s%@ESD_CFLAGS@%$ESD_CFLAGS%g
4111 + s%@ESD_LIBS@%$ESD_LIBS%g
4112   s%@DEFINES@%$DEFINES%g
3786 s%@STATICLIBS@%$STATICLIBS%g
4113   s%@SYSSRCS@%$SYSSRCS%g
4114   s%@CPUINCLUDES@%$CPUINCLUDES%g
4115   s%@CPUSRCS@%$CPUSRCS%g

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines