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

Comparing BasiliskII/src/Unix/configure.in (file contents):
Revision 1.44 by gbeauche, 2001-06-26T22:35:40Z vs.
Revision 1.61 by cebix, 2002-07-31T16:46:14Z

# Line 1 | Line 1
1   dnl Process this file with autoconf to produce a configure script.
2 < dnl Written in 1999 by Christian Bauer et al.
2 > dnl Written in 2002 by Christian Bauer et al.
3  
4   AC_INIT(main_unix.cpp)
5   AC_PREREQ(2.12)
# Line 87 | Line 87 | if [[ "x$WANT_MON" = "xyes" ]]; then
87    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
88      AC_MSG_RESULT(yes)
89      AC_DEFINE(ENABLE_MON)
90 <    MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c"
90 >    MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/mon_lowmem.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c"
91      CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
92 +    AC_CHECK_LIB(ncurses, tgetent, ,
93 +      AC_CHECK_LIB(termcap, tgetent, ,
94 +        AC_CHECK_LIB(termlib, tgetent, ,
95 +          AC_CHECK_LIB(terminfo, tgetent, ,
96 +            AC_CHECK_LIB(Hcurses, tgetent, ,
97 +              AC_CHECK_LIB(curses, tgetent))))))
98      AC_CHECK_LIB(readline, readline)
93    AC_CHECK_LIB(termcap, tputs)
99      AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
100    else
101      AC_MSG_RESULT(no)
# Line 101 | Line 106 | fi
106  
107   dnl Checks for libraries.
108   AC_CHECK_LIB(posix4, sem_init)
109 + AC_CHECK_LIB(rt, timer_create)
110  
111   dnl We need X11.
112   AC_PATH_XTRA
# Line 124 | Line 130 | if [[ "x$HAVE_PTHREADS" = "xyes" ]]; the
130    AC_DEFINE(HAVE_PTHREADS)
131   fi
132   AC_CHECK_FUNCS(pthread_cancel)
133 + AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
134 + AC_CHECK_FUNCS(pthread_mutexattr_settype)
135  
136   dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
137   SEMSRC=
# Line 167 | Line 175 | UISRCS=../dummy/prefs_editor_dummy.cpp
175   if [[ "x$WANT_GTK" = "xyes" ]]; then
176    AM_PATH_GTK(1.2.0, [
177      AC_DEFINE(ENABLE_GTK)
170    CFLAGS="$CFLAGS $GTK_CFLAGS"
178      CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
179      LIBS="$LIBS $GTK_LIBS"
180      UISRCS=prefs_editor_gtk.cpp
181 +    B2_PATH_GNOMEUI([
182 +      AC_DEFINE(HAVE_GNOMEUI)
183 +      CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS"
184 +      LIBS="$LIBS $GNOMEUI_LIBS"
185 +    ], [])
186    ], [
187      AC_MSG_WARN([Could not find GTK+, disabling user interface.])
188      WANT_GTK=no
# Line 190 | Line 202 | if [[ "x$WANT_ESD" = "xyes" ]]; then
202    ])
203   fi
204  
205 + dnl We use 64-bit file size support if possible.
206 + dnl FIXME: Use AC_SYS_LARGEFILE from autoconf 2.5+
207 + if [[ "x$OS_TYPE" = "xlinux" ]]; then
208 +  AC_DEFINE(_USE_LARGEFILE_SOURCE, 1, [Get more functions for correct standard I/O])
209 +  AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
210 + fi
211 +
212   dnl Checks for header files.
213   AC_HEADER_STDC
214   AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/mman.h)
# Line 205 | Line 224 | AC_CHECK_SIZEOF(long long, 8)
224   AC_CHECK_SIZEOF(void *, 4)
225   AC_TYPE_OFF_T
226   AC_CHECK_TYPE(loff_t, off_t)
227 + AC_CHECK_TYPE(caddr_t, [char *])
228   AC_TYPE_SIZE_T
229   AC_TYPE_SIGNAL
230   AC_HEADER_TIME
231   AC_STRUCT_TM
232  
233 + dnl Check whether sys/socket.h defines type socklen_t.
234 + dnl (extracted from ac-archive/Miscellaneous)
235 + AC_CACHE_CHECK("for socklen_t",
236 +  ac_cv_type_socklen_t, [
237 +  AC_TRY_COMPILE([
238 +    #include <sys/types.h>
239 +    #include <sys/socket.h>
240 +  ], [socklen_t len = 42; return 0;],
241 +  ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no,
242 +  dnl When cross-compiling, do not assume anything.
243 +  ac_cv_type_socklen_t="guessing no"
244 +  )
245 + ])
246 + if [[ "x$ac_cv_type_socklen_t" != "xyes" ]]; then
247 +  AC_DEFINE(socklen_t, int)
248 + fi
249 +
250   dnl Checks for library functions.
251   AC_CHECK_FUNCS(strdup cfmakeraw)
252   AC_CHECK_FUNCS(clock_gettime timer_create)
# Line 220 | Line 257 | AC_CHECK_FUNCS(vm_allocate vm_deallocate
257   dnl Darwin seems to define mach_task_self() instead of task_self().
258   AC_CHECK_FUNCS(mach_task_self task_self)
259  
260 + dnl Check for headers and functions related to pty support (sshpty.c)
261 + dnl From openssh-3.2.2p1 configure.ac
262 +
263 + AC_CHECK_HEADERS(strings.h login.h sys/bsdtty.h sys/stat.h util.h pty.h)
264 + AC_CHECK_FUNCS(_getpty vhangup strlcpy)
265 +
266 + case "$host" in
267 + *-*-hpux10.26)
268 +        disable_ptmx_check=yes
269 +        ;;
270 + *-*-linux*)
271 +        no_dev_ptmx=1
272 +        ;;
273 + mips-sony-bsd|mips-sony-newsos4)
274 +        AC_DEFINE(HAVE_NEWS4)
275 +        ;;
276 + *-*-sco3.2v4*)
277 +        no_dev_ptmx=1
278 +        ;;
279 + *-*-sco3.2v5*)
280 +        no_dev_ptmx=1
281 +        ;;
282 + esac
283 +
284 + if test -z "$no_dev_ptmx" ; then
285 +        if test "x$disable_ptmx_check" != "xyes" ; then
286 +                AC_CHECK_FILE("/dev/ptmx",
287 +                        [
288 +                                AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
289 +                                have_dev_ptmx=1
290 +                        ]
291 +                )
292 +        fi
293 + fi
294 + AC_CHECK_FILE("/dev/ptc",
295 +        [
296 +                AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
297 +                have_dev_ptc=1
298 +        ]
299 + )
300 +
301 + dnl (end of code from openssh-3.2.2p1 configure.ac)
302 +
303 +
304   dnl Select system-dependant source files.
305   SERIALSRC=serial_unix.cpp
306   ETHERSRC=../dummy/ether_dummy.cpp
# Line 264 | Line 345 | solaris*)
345    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
346    ;;
347   irix*)
348 +  ETHERSRC=ether_unix.cpp
349    AUDIOSRC=Irix/audio_irix.cpp
350    EXTRASYSSRCS=Irix/unaligned.c
351    dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
352    DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
353    LIBS="$LIBS -laudio"
354 +  WANT_ESD=no
355  
356    dnl Check if our compiler supports -Ofast (MIPSPro)
357    HAVE_OFAST=no
# Line 548 | Line 631 | AC_CACHE_CHECK("whether your system supp
631    ]
632   )
633   AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals")
634 <
634 >
635   dnl Otherwise, check for subterfuges.
636   if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
637    AC_CACHE_CHECK("whether we then have a subterfuge for your system",
# Line 569 | Line 652 | if [[ "x$ac_cv_have_extended_signals" =
652    AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack")
653   fi
654  
655 + dnl Check if we can ignore the fault (instruction skipping in SIGSEGV handler)
656 + AC_CACHE_CHECK("whether we can skip instruction in SIGSEGV handler",
657 +  ac_cv_have_skip_instruction, [
658 +  AC_LANG_SAVE
659 +  AC_LANG_CPLUSPLUS
660 +  AC_TRY_RUN([
661 +    #define HAVE_SIGSEGV_SKIP_INSTRUCTION 1
662 +    #define CONFIGURE_TEST_SIGSEGV_RECOVERY
663 +    #include "vm_alloc.cpp"
664 +    #include "sigsegv.cpp"
665 +  ], ac_cv_have_skip_instruction=yes, ac_cv_have_skip_instruction=no,
666 +  dnl When cross-compiling, do not assume anything.
667 +  ac_cv_have_skip_instruction=no
668 +  )
669 +  AC_LANG_RESTORE
670 +  ]
671 + )
672 + AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_INSTRUCTION, "$ac_cv_have_skip_instruction")
673 +
674   dnl Can we do Video on SEGV Signals ?
675   CAN_VOSF=no
676   if [[ "$ac_cv_have_extended_signals" = "yes" -o "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
# Line 649 | Line 751 | AC_EGREP_CPP(yes,
751   #endif
752   ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
753  
754 + dnl Check for GCC 3.0 or higher.
755 + HAVE_GCC30=no
756 + AC_MSG_CHECKING(for GCC 3.0 or higher)
757 + AC_EGREP_CPP(yes,
758 + [#if __GNUC__ >= 3
759 +  yes
760 + #endif
761 + ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
762 +
763   dnl Set "-fomit-frame-pointer" on i386 GCC 2.7 or higher.
764 + dnl Also set "-fno-exceptions" for C++ because exception handling requires
765 + dnl the frame pointer.
766   if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
767    CFLAGS="$CFLAGS -fomit-frame-pointer"
768 <  CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
768 >  CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -fno-exceptions"
769 > fi
770 >
771 > dnl (gb) Do not merge constants since it breaks fpu/fpu_x86.cpp.
772 > dnl As of 2001/08/02, this affects the following compilers:
773 > dnl Official: probably gcc-3.1 (mainline CVS)
774 > dnl Mandrake: gcc-2.96 >= 0.59mdk, gcc-3.0.1 >= 0.1mdk
775 > dnl Red Hat : gcc-2.96 >= 89, gcc-3.0 >= 1
776 > if [[ "x$HAVE_GCC27" = "xyes" ]]; then
777 >  SAVED_CXXFLAGS="$CXXFLAGS"
778 >  CXXFLAGS="$CXXFLAGS -fno-merge-constants"
779 >  AC_CACHE_CHECK([whether GCC supports constants merging], ac_cv_gcc_constants_merging, [
780 >    AC_LANG_SAVE
781 >    AC_LANG_CPLUSPLUS
782 >    AC_TRY_COMPILE([],[],[ac_cv_gcc_constants_merging=yes],[ac_cv_gcc_constants_merging=no])
783 >    AC_LANG_RESTORE
784 >  ])
785 >  if [[ "x$ac_cv_gcc_constants_merging" != "xyes" ]]; then
786 >    CXXFLAGS="$SAVED_CXXFLAGS"
787 >  fi
788   fi
789  
790   dnl Select appropriate CPU source and REGPARAM define.
# Line 705 | Line 837 | if [[ "x$FPE_CORE" = "xdefault" ]]; then
837      DEFINES="$DEFINES -DFPU_X86"
838      FPE_CORE_STR="i386 optimized core"
839      FPUSRCS="../uae_cpu/fpu/fpu_x86.cpp"
840 +    FPE_CORE="i386"
841    else
842      FPE_CORE="uae"
843    fi
# Line 754 | Line 887 | if [[ "x$HAVE_OFAST" = "xyes" ]]; then
887    CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -Ofast"
888    CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -Ofast"
889    CXXFLAGS="-LANG:std $CXXFLAGS"
890 <  LDFLAGS="$LDFLAGS -Ofast"
890 >  LDFLAGS="$LDFLAGS -ipa"
891   fi
892  
893   dnl Generate Makefile.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines