/* Define if struct statfs is defined in <sys/mount.h> */
#undef HAVE_STRUCT_STATFS
+/* Define if System V semaphores are supported */
+#undef HAVE_SYSV_SEM
+
+/* Define if System V shared memory is supported */
+#undef HAVE_SYSV_SHM
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_sem" >&5
$as_echo "$ac_cv_sysv_sem" >&6; }
+if test x"$ac_cv_sysv_sem" = x"yes"; then :
+
+$as_echo "#define HAVE_SYSV_SEM 1" >>confdefs.h
+
+
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether System V shared memory is supported" >&5
$as_echo_n "checking whether System V shared memory is supported... " >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_shm" >&5
$as_echo "$ac_cv_sysv_shm" >&6; }
+if test x"$ac_cv_sysv_shm" = x"yes"; then :
+
+$as_echo "#define HAVE_SYSV_SHM 1" >>confdefs.h
+
-if test x"$ac_cv_sysv_shm" = x"yes" -a x"$ac_cv_sysv_sem" = x"yes" ; then
- sim_sysv_ipc_hw=",sem,shm";
-else
- sim_sysv_ipc_hw="";
fi
# Check whether --enable-sim-hardware was given.
if test "${enable_sim_hardware+set}" = set; then :
- enableval=$enable_sim_hardware; hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide${sim_sysv_ipc_hw}"
+ enableval=$enable_sim_hardware; hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
case "${enableval}" in
yes) ;;
no) as_fn_error $? "\"List of hardware must be specified for --enable-sim-hardware\"" "$LINENO" 5; hardware="";;
echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
fi
else
- hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide${sim_sysv_ipc_hw}"
+ hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
if test x"$silent" != x"yes"; then
if (semctl(id, 0, IPC_RMID, arg) == -1)
return 1;
], [ac_cv_sysv_sem="yes"], [ac_cv_sysv_sem="no"])])
+AS_IF([test x"$ac_cv_sysv_sem" = x"yes"], [dnl
+ AC_DEFINE(HAVE_SYSV_SEM, 1, [Define if System V semaphores are supported])
+])
AC_CACHE_CHECK(whether System V shared memory is supported,
ac_cv_sysv_shm,
if (shmctl(id, IPC_RMID, 0) == -1)
return 1;
], [ac_cv_sysv_shm="yes"], [ac_cv_sysv_shm="no"])])
-
-if test x"$ac_cv_sysv_shm" = x"yes" -a x"$ac_cv_sysv_sem" = x"yes" ; then
- sim_sysv_ipc_hw=",sem,shm";
-else
- sim_sysv_ipc_hw="";
-fi
+AS_IF([test x"$ac_cv_sysv_shm" = x"yes"], [dnl
+ AC_DEFINE(HAVE_SYSV_SHM, 1, [Define if System V shared memory is supported])
+])
AC_ARG_ENABLE(sim-hardware,
[ --enable-sim-hardware=list Specify the hardware to be included in the build.],
-[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide${sim_sysv_ipc_hw}"
+[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
case "${enableval}" in
yes) ;;
no) AC_MSG_ERROR("List of hardware must be specified for --enable-sim-hardware"); hardware="";;
sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
if test x"$silent" != x"yes" && test x"$hardware" != x""; then
echo "Setting hardware to $sim_hw_src, $sim_hw_obj"
-fi],[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide${sim_sysv_ipc_hw}"
+fi],[hardware="cpu,memory,nvram,iobus,htab,disk,trace,register,vm,init,core,pal,com,eeprom,opic,glue,phb,ide,sem,shm"
sim_hw_src=`echo $hardware | sed -e 's/,/.c hw_/g' -e 's/^/hw_/' -e s'/$/.c/'`
sim_hw_obj=`echo $sim_hw_src | sed -e 's/\.c/.o/g'`
if test x"$silent" != x"yes"; then
*/
+#ifdef HAVE_SYSV_SEM
+
typedef struct _hw_sem_device {
unsigned_word physical_address;
key_t key;
{ NULL },
};
+#else
+
+const device_descriptor hw_sem_device_descriptor[] = {
+ { NULL },
+};
+
+#endif /* HAVE_SYSV_SEM */
+
#endif /* _HW_SEM_C_ */
*/
+#ifdef HAVE_SYSV_SHM
+
typedef struct _hw_shm_device {
unsigned_word physical_address;
char *shm_address;
{ NULL },
};
+#else
+
+const device_descriptor hw_shm_device_descriptor[] = {
+ { NULL },
+};
+
+#endif /* HAVE_SYSV_SHM */
+
#endif /* _HW_SHM_C_ */