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.8 by cebix, 1999-10-21T13:19:21Z vs.
Revision 1.13 by cebix, 1999-10-25T20:52:12Z

# Line 6 | Line 6 | AC_PREREQ(2.12)
6   AC_CONFIG_HEADER(config.h)
7  
8   dnl Options.
9 < WANT_XF86_DGA=yes
10 < WANT_FBDEV_DGA=yes
11 < WANT_UI=yes
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], [])
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(fbdev-dga, [  --enable-fbdev-dga      use direct frame buffer access via /dev/fb [default=yes]], [WANT_FBDEV_DGA=$enableval], [WANT_FBDEV_DGA=yes])
11 > AC_ARG_ENABLE(esd,       [  --enable-esd            Enlightened Sound Daemon support [default=yes]], [WANT_ESD=$enableval], [WANT_ESD=yes])
12 > AC_ARG_ENABLE(ui,        [  --enable-ui             use GTK user interface [default=yes]], [WANT_UI=$enableval], [WANT_UI=yes])
13  
14   dnl Checks for programs.
15   AC_PROG_CC
# Line 20 | Line 18 | AC_PROG_CXX
18   AC_PROG_MAKE_SET
19   AC_PROG_INSTALL
20  
21 + dnl We use mon if possible.
22 + MONSRCS=
23 + AC_MSG_CHECKING(for mon)
24 + if grep mon_init ../../../mon/src/mon.h >/dev/null 2>/dev/null; then
25 +  AC_MSG_RESULT(yes)
26 +  WANT_MON=yes
27 +  DEFINES="$DEFINES -DENABLE_MON=1"
28 +  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"
29 +  CXXFLAGS="$CXXFLAGS -I../../../mon/src"
30 + else
31 +  AC_MSG_RESULT(no)
32 +  WANT_MON=no
33 +  DEFINES="$DEFINES -DENABLE_MON=0"
34 + fi
35 +
36   dnl Checks for libraries.
37 + AC_CHECK_LIB(posix4, sem_init)
38 +
39 + dnl We need X11.
40   AC_PATH_XTRA
41   if [[ "x$no_x" = "xyes" ]]; then
42    AC_MSG_ERROR([You need X11 to run Basilisk II.])
43   fi
28
44   CFLAGS="$CFLAGS $X_CFLAGS"
45   CXXFLAGS="$CXXFLAGS $X_CFLAGS"
46   LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
32 STATICLIBS=
47  
48 < dnl We need pthreads.
49 < AC_CHECK_LIB(pthread, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no)
50 < if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
51 <  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 <    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
48 > dnl We need pthreads. Try libpthread first, then libc_r (FreeBSD), then PTL.
49 > AC_CHECK_LIB(pthread, pthread_create, , [
50 >  AC_CHECK_LIB(c_r, pthread_create, , [
51 >    AC_CHECK_LIB(PTL, pthread_create, , [
52        AC_MSG_ERROR([You need pthreads to run Basilisk II.])
53 <    else
54 <      LIBS="$LIBS -lPTL"
55 <    fi
47 <  else
48 <     LIBS="$LIBS -lc_r"
49 <  fi
50 < else
51 <  LIBS="$LIBS -lpthread"
52 < fi
53 < AC_CHECK_FUNCS(pthread_cancel)
53 >    ])
54 >  ])
55 > ])
56  
57 < dnl We use DGA if possible.
57 > dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
58 > SEMSRCS=
59 > AC_CHECK_FUNCS(sem_init, , [
60 >  SEMSRCS=posix_sem.cpp
61 > ])
62 >
63 > dnl We use DGA (XFree86 or fbdev) if possible.
64   if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then
65 <  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 XFree86 DGA extension, ignoring --enable-xf86-dga.])
60 <    DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
61 <  else
65 >  AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, [
66      DEFINES="$DEFINES -DENABLE_XF86_DGA=1"
67      LIBS="$LIBS -lXxf86dga"
68      if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then
69        AC_MSG_WARN([Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga.])
70        WANT_FBDEV_DGA=no
71      fi
72 <  fi
72 >  ], [
73 >    AC_MSG_WARN([Could not find XFree86 DGA extension, ignoring --enable-xf86-dga.])
74 >    WANT_XF86_DGA=no
75 >    DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
76 >  ])
77   else
78    DEFINES="$DEFINES -DENABLE_XF86_DGA=0"
79   fi
# Line 76 | Line 84 | else
84   fi
85  
86   dnl We use GTK+ if possible.
87 + UISRCS=../dummy/prefs_editor_dummy.cpp
88   if [[ "x$WANT_UI" = "xyes" ]]; then
89 <  AM_PATH_GTK(1.2.0)
81 <  if [[ "x$no_gtk" = "xyes" ]]; then
82 <    echo "Did not find gtk+, disabling user interface."
83 <    WANT_UI=no
84 <    GTK_CFLAGS=
85 <    GTK_LIBS=
86 <  else
89 >  AM_PATH_GTK(1.2.0, [
90      DEFINES="$DEFINES -DENABLE_GTK=1"
91 <  fi
92 <  CFLAGS="$CFLAGS $GTK_CFLAGS"
93 <  CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
94 <  LIBS="$LIBS $GTK_LIBS"
91 >    CFLAGS="$CFLAGS $GTK_CFLAGS"
92 >    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
93 >    LIBS="$LIBS $GTK_LIBS"
94 >    UISRCS=prefs_editor_gtk.cpp
95 >  ], [
96 >    AC_MSG_WARN([Could not find GTK+, disabling user interface.])
97 >    WANT_UI=no
98 >  ])
99   fi
100  
101 < dnl We need POSIX.4 semaphores (and other POSIX.4 blessings).
102 < SEMSRCS=
103 < AC_CHECK_FUNCS(sem_init)
104 < if [[ "x$ac_cv_func_sem_init" = "xno" ]]; then
105 <  AC_CHECK_LIB(posix4, sem_init, HAVE_LIBPOSIX4=yes, HAVE_LIBPOSIX4=no)
106 <  if [[ "x$HAVE_LIBPOSIX4" = "xno" ]]; then
107 <    dnl Emulate semaphores with pthread mutexes
108 <    SEMSRCS="posix_sem.cpp"
109 <  else
110 <    LIBS="$LIBS -lposix4"
111 <  fi
101 > dnl We use ESD if possible.
102 > if [[ "x$WANT_ESD" = "xyes" ]]; then
103 >  AM_PATH_ESD(0.2.8, [
104 >    DEFINES="$DEFINES -DENABLE_ESD=1"
105 >    CFLAGS="$CFLAGS $ESD_CFLAGS"
106 >    CXXFLAGS="$CXXFLAGS $ESD_CFLAGS"
107 >    LIBS="$LIBS $ESD_LIBS"
108 >  ], [
109 >    AC_MSG_WARN([Could not find ESD, disabling ESD support.])
110 >    WANT_ESD=no
111 >  ])
112   fi
113  
114   dnl Checks for header files.
# Line 125 | Line 132 | AC_STRUCT_TM
132   dnl Checks for library functions.
133   AC_CHECK_FUNCS(strdup cfmakeraw)
134   AC_CHECK_FUNCS(nanosleep clock_gettime timer_create)
135 + AC_CHECK_FUNCS(pthread_cancel)
136  
137   dnl Select system-dependant source files.
138   SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp"
139   if MACHINE=`uname -a 2>/dev/null`; then
140    case "$MACHINE" in
141    Linux*)
142 <    SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp Linux/audio_linux.cpp"
142 >    SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp audio_oss_esd.cpp"
143      ;;
144    FreeBSD*3.*)
145      dnl Check for the CAM library
# Line 146 | Line 154 | if MACHINE=`uname -a 2>/dev/null`; then
154          dnl to access directly to the functions in the kernel :) --Orlando
155          AC_MSG_ERROR([Cannot find kernel includes for CAM library.])
156        fi
157 <      SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp"
157 >      SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp audio_oss_esd.cpp"
158        CXXFLAGS="$CXXFLAGS -I/sys"
159        CFLAGS="$CFLAGS -I/sys"
160        LIBS="$LIBS -lcam"
# Line 180 | Line 188 | if MACHINE=`uname -a 2>/dev/null`; then
188      ;;
189    esac
190   fi
191 < 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.
193 < CPUINCLUDES="-I../uae_cpu"
194 < 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"
191 > SYSSRCS="$SYSSRCS $SEMSRCS $UISRCS $MONSRCS"
192  
193 < dnl Check for i386.
193 > dnl Check for i386 CPU.
194   HAVE_I386=no
195   AC_MSG_CHECKING(for x86 target CPU)
196   AC_EGREP_CPP(yes,
# Line 203 | Line 200 | AC_EGREP_CPP(yes,
200   #endif
201   ], [AC_MSG_RESULT(yes); HAVE_I386=yes], AC_MSG_RESULT(no))
202  
203 + dnl Check for SPARC CPU.
204 + HAVE_SPARC=no
205 + AC_MSG_CHECKING(for SPARC target CPU)
206 + AC_EGREP_CPP(yes,
207 + [
208 + #ifdef __sparc__
209 +  yes
210 + #endif
211 + ], [AC_MSG_RESULT(yes); HAVE_SPARC=yes], AC_MSG_RESULT(no))
212 +
213   dnl Check for GAS.
214   HAVE_GAS=no
215   AC_MSG_CHECKING(for GAS .p2align feature)
# Line 222 | Line 229 | AC_EGREP_CPP(yes,
229   #endif
230   ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
231  
232 < dnl Set "-fomit-frame-pointer" on GCC.
232 > dnl Set "-fomit-frame-pointer" on GCC 2.7 or higher.
233   if [[ "x$HAVE_GCC27" = "xyes" ]]; then
234    CFLAGS="$CFLAGS -fomit-frame-pointer"
235    CXXFLAGS="$CXXFLAGS -fomit-frame-pointer"
236   fi
237  
238   dnl Select appropriate CPU source and REGPARAM define.
239 + WANT_X86_ASSEMBLY=no
240 + WANT_SPARC_V8_ASSEMBLY=no
241 + WANT_SPARC_V9_ASSEMBLY=no
242 + CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
243   if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
244 +  dnl i386 CPU
245    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
246    if [[ "x$HAVE_GAS" = "xyes" ]]; then
247 +    WANT_X86_ASSEMBLY=yes
248      DEFINES="$DEFINES -DX86_ASSEMBLY"
249 <    CPUSRCS="$CPUSRCS cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
237 <  else
238 <    CPUSRCS="$CPUSRCS cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
249 >    CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
250    fi
251 < else
252 <  CPUSRCS="$CPUSRCS cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
251 > elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
252 >  dnl SPARC CPU
253 >  case "$MACHINE" in
254 >  SunOS*)
255 >    AC_MSG_CHECKING(SPARC CPU architecture)
256 >    SPARC_TYPE=`Solaris/which_sparc`
257 >    AC_MSG_RESULT($SPARC_TYPE)
258 >    case "$SPARC_TYPE" in
259 >    SPARC_V8)
260 >      WANT_SPARC_V8_ASSEMBLY=yes
261 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY"
262 >      CFLAGS="$CFLAGS -Wa,-Av8"
263 >      CXXFLAGS="$CXXFLAGS -Wa,-Av8"
264 >      ;;
265 >    SPARC_V9)
266 >      WANT_SPARC_V9_ASSEMBLY=yes
267 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY"
268 >      CFLAGS="$CFLAGS -Wa,-Av9"
269 >      CXXFLAGS="$CXXFLAGS -Wa,-Av9"
270 >      ;;
271 >    esac
272 >    ;;
273 >  esac
274   fi
275  
276 + dnl UAE CPU sources for all architectures.
277 + CPUINCLUDES="-I../uae_cpu"
278 + 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"
279 +
280   dnl Generate Makefile.
281   AC_SUBST(DEFINES)
246 AC_SUBST(STATICLIBS)
282   AC_SUBST(SYSSRCS)
283   AC_SUBST(CPUINCLUDES)
284   AC_SUBST(CPUSRCS)
285   AC_OUTPUT(Makefile)
286 +
287 + dnl Print summary.
288 + echo
289 + echo Basilisk II configuration summary:
290 + echo
291 + echo XFree86 DGA support .............. : $WANT_XF86_DGA
292 + echo fbdev DGA support ................ : $WANT_FBDEV_DGA
293 + echo ESD sound support ................ : $WANT_ESD
294 + echo GTK user interface ............... : $WANT_UI
295 + echo mon debugger support ............. : $WANT_MON
296 + echo i386 assembly optimizations ...... : $WANT_X86_ASSEMBLY
297 + echo SPARC V8 assembly optimizations .. : $WANT_SPARC_V8_ASSEMBLY
298 + echo SPARC V9 assembly optimizations .. : $WANT_SPARC_V9_ASSEMBLY
299 + echo
300   echo "Configuration done. Now type \"make\"."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines