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.51 by cebix, 2002-01-18T19:14:46Z vs.
Revision 1.61 by cebix, 2002-07-31T16:46:14Z

# Line 5 | Line 5 | AC_INIT(main_unix.cpp)
5   AC_PREREQ(2.12)
6   AC_CONFIG_HEADER(config.h)
7  
8 dnl These defines are necessary to get 64-bit file size support.
9 AC_DEFINE(_USE_LARGEFILE_SOURCE, 1, [Get more functions for correct standard I/O])
10 AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
11
8   dnl Options.
9   AC_ARG_ENABLE(xf86-dga,      [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
10   AC_ARG_ENABLE(xf86-vidmode,  [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
# Line 93 | Line 89 | if [[ "x$WANT_MON" = "xyes" ]]; then
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/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)
97    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 129 | 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 172 | 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)
175    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 195 | 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 210 | 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 < TYPE_SOCKLEN_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 226 | 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 556 | 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 577 | 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 667 | Line 761 | AC_EGREP_CPP(yes,
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.
# Line 791 | 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