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.4 by cebix, 1999-10-05T18:38:50Z vs.
Revision 1.9 by cebix, 1999-10-21T15:14:41Z

# Line 6 | Line 6 | AC_PREREQ(2.12)
6   AC_CONFIG_HEADER(config.h)
7  
8   dnl Options.
9 < WANT_DGA=yes
9 > WANT_XF86_DGA=yes
10 > WANT_FBDEV_DGA=yes
11   WANT_UI=yes
12 < AC_ARG_ENABLE(dga, [  --enable-dga            use the DGA extension (default)], [WANT_DGA=$enableval], [])
12 > AC_ARG_ENABLE(xf86-dga, [  --enable-xf86-dga       use the XFree86 DGA extension (default)], [WANT_XF86_DGA=$enableval], [])
13 > AC_ARG_ENABLE(fbdev-dga, [  --enable-fbdev-dga      use direct frame buffer access via /dev/fb (default)], [WANT_FBDEV_DGA=$enableval], [])
14   AC_ARG_ENABLE(ui,  [  --enable-ui             use GTK user interface (default)], [WANT_UI=$enableval], [])
15  
16   dnl Checks for programs.
# Line 35 | Line 37 | if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
37    dnl Check even the libc_r (FreeBSD)
38    AC_CHECK_LIB(c_r, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no)
39    if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
40 <     AC_MSG_ERROR([You need libpthreads to run Basilisk II.])
40 >    dnl Or maybe the user has PTL (NetBSD)
41 >    AC_CHECK_LIB(PTL, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no)
42 >    if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
43 >      AC_MSG_ERROR([You need pthreads to run Basilisk II.])
44 >    else
45 >      LIBS="$LIBS -lPTL"
46 >    fi
47    else
48       LIBS="$LIBS -lc_r"
49    fi
# Line 45 | Line 53 | fi
53   AC_CHECK_FUNCS(pthread_cancel)
54  
55   dnl We use DGA if possible.
56 < if [[ "x$WANT_DGA" = "xyes" ]]; then
56 > if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then
57    AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, HAVE_DGA=yes, HAVE_DGA=no)
58    if [[ "x$HAVE_DGA" = "xno" ]]; then
59 <    AC_MSG_WARN([Could not find DGA extension, ignoring --enable-dga.])
59 >    AC_MSG_WARN([Could not find XFree86 DGA extension, ignoring --enable-xf86-dga.])
60 >    DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
61    else
62 <    DEFINES="$DEFINES -DENABLE_DGA=1"
62 >    DEFINES="$DEFINES -DENABLE_XF86_DGA=1"
63      LIBS="$LIBS -lXxf86dga"
64 +    if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then
65 +      AC_MSG_WARN([Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga.])
66 +      WANT_FBDEV_DGA=no
67 +    fi
68    fi
69 + else
70 +  DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
71 + fi
72 + if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then
73 +  DEFINES="$DEFINES -DENABLE_FBDEV_DGA=1"
74 + else
75 +  DEFINES="$DEFINES -DENABLE_FBDEV_DGA=0"
76   fi
77  
78   dnl We use GTK+ if possible.
# Line 77 | Line 97 | AC_CHECK_FUNCS(sem_init)
97   if [[ "x$ac_cv_func_sem_init" = "xno" ]]; then
98    AC_CHECK_LIB(posix4, sem_init, HAVE_LIBPOSIX4=yes, HAVE_LIBPOSIX4=no)
99    if [[ "x$HAVE_LIBPOSIX4" = "xno" ]]; then
100 <    dnl Checks for the existance of semget
101 <    AC_CHECK_FUNCS(semget)
82 <    if [[ "x$ac_cv_func_semget" = "xno" ]]; then
83 <      AC_MSG_ERROR([You need POSIX.4 semaphores to run Basilisk II.])
84 <    else
85 <      SEMSRCS="posix_sem.cpp"
86 <    fi
100 >    dnl Emulate semaphores with pthread mutexes
101 >    SEMSRCS="posix_sem.cpp"
102    else
103      LIBS="$LIBS -lposix4"
104    fi
# Line 164 | Line 179 | if MACHINE=`uname -a 2>/dev/null`; then
179      LIBS="$LIBS -lm"
180      ;;
181    esac
182 <  if [[ "x$WANT_UI" = "xyes" ]]; then
183 <    SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp"
184 <  else
185 <    SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp"
186 <  fi
182 > fi
183 > if [[ "x$WANT_UI" = "xyes" ]]; then
184 >  SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp"
185 > else
186 >  SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp"
187   fi
188   if [[ "x$SEMSRCS" != "x" ]]; then
189    SYSSRCS="$SYSSRCS $SEMSRCS"
190   fi
191  
192 < dnl Defaults for UAE CPU.
178 < CPUINCLUDES="-I../uae_cpu"
179 < 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"
180 <
181 < dnl Check for i386.
192 > dnl Check for i386 CPU.
193   HAVE_I386=no
194   AC_MSG_CHECKING(for x86 target CPU)
195   AC_EGREP_CPP(yes,
# Line 188 | Line 199 | AC_EGREP_CPP(yes,
199   #endif
200   ], [AC_MSG_RESULT(yes); HAVE_I386=yes], AC_MSG_RESULT(no))
201  
202 + dnl Check for SPARC CPU.
203 + HAVE_SPARC=no
204 + AC_MSG_CHECKING(for SPARC target CPU)
205 + AC_EGREP_CPP(yes,
206 + [
207 + #ifdef __sparc__
208 +  yes
209 + #endif
210 + ], [AC_MSG_RESULT(yes); HAVE_SPARC=yes], AC_MSG_RESULT(no))
211 +
212   dnl Check for GAS.
213   HAVE_GAS=no
214   AC_MSG_CHECKING(for GAS .p2align feature)
# Line 207 | Line 228 | AC_EGREP_CPP(yes,
228   #endif
229   ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
230  
231 < dnl Set "-fomit-frame-pointer" on GCC.
231 > dnl Set "-fomit-frame-pointer" on GCC 2.7 or higher.
232   if [[ "x$HAVE_GCC27" = "xyes" ]]; then
233    CFLAGS="$CFLAGS -fomit-frame-pointer"
234    CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
235   fi
236  
237   dnl Select appropriate CPU source and REGPARAM define.
238 + CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
239   if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
240 +  dnl i386 CPU
241    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
242    if [[ "x$HAVE_GAS" = "xyes" ]]; then
243      DEFINES="$DEFINES -DX86_ASSEMBLY"
244 <    CPUSRCS="$CPUSRCS cpufast.s"
222 <  else
223 <    CPUSRCS="$CPUSRCS cpuemu.cpp"
244 >    CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
245    fi
246 < else
247 <  CPUSRCS="$CPUSRCS cpuemu.cpp"
246 > elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
247 >  dnl SPARC CPU
248 >  case "$MACHINE" in
249 >  SunOS*)
250 >    AC_MSG_CHECKING(SPARC CPU architecture)
251 >    SPARC_TYPE=`Solaris/which_sparc`
252 >    AC_MSG_RESULT($SPARC_TYPE)
253 >    case "$SPARC_TYPE" in
254 >    SPARC_V8)
255 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY"
256 >      CFLAGS="$CFLAGS -Wa,-Av8"
257 >      CXXFLAGS="$CXXFLAGS -Wa,-Av8"
258 >      ;;
259 >    SPARC_V9)
260 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY"
261 >      CFLAGS="$CFLAGS -Wa,-Av9"
262 >      CXXFLAGS="$CXXFLAGS -Wa,-Av9"
263 >      ;;
264 >    esac
265 >    ;;
266 >  esac
267   fi
268  
269 + dnl UAE CPU sources for all architectures.
270 + CPUINCLUDES="-I../uae_cpu"
271 + 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"
272 +
273   dnl Generate Makefile.
274   AC_SUBST(DEFINES)
275   AC_SUBST(STATICLIBS)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines