diff options
author | Michael Meissner <gnu@the-meissners.org> | 1996-06-26 20:01:38 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1996-06-26 20:01:38 +0000 |
commit | ed451ff744c6d3a5b1d6d9d8d0bdce18fc10e9a7 (patch) | |
tree | ba8864c06f8898db25e4c3711f72dfba3e3fb030 | |
parent | 90c1d8f7e4461ebf9c192f495836fb6210246236 (diff) | |
download | binutils-ed451ff744c6d3a5b1d6d9d8d0bdce18fc10e9a7.zip binutils-ed451ff744c6d3a5b1d6d9d8d0bdce18fc10e9a7.tar.gz binutils-ed451ff744c6d3a5b1d6d9d8d0bdce18fc10e9a7.tar.bz2 |
Make simulator build again on SunOS and HP/US systems
-rw-r--r-- | sim/ppc/configure.in | 110 |
1 files changed, 90 insertions, 20 deletions
diff --git a/sim/ppc/configure.in b/sim/ppc/configure.in index 99816a0..5d0f779 100644 --- a/sim/ppc/configure.in +++ b/sim/ppc/configure.in @@ -1,9 +1,8 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.5)dnl +AC_PREREQ(2.3)dnl AC_INIT(Makefile.in) AC_PROG_CC -AC_PROG_INSTALL # Put a plausible default for CC_FOR_BUILD in Makefile. AC_C_CROSS @@ -405,6 +404,94 @@ AC_ARG_PROGRAM AC_CONFIG_HEADER(config.h:config.in) +AC_STRUCT_ST_BLKSIZE +AC_STRUCT_ST_BLOCKS +AC_STRUCT_ST_RDEV +AC_STRUCT_TIMEZONE + +AC_TYPE_GETGROUPS +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIGNAL +AC_TYPE_SIZE_T +AC_TYPE_UID_T + +AC_CHECK_FUNCS(cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink) + +AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h) +AC_HEADER_DIRENT + +dnl Figure out what type of termio/termios support there is +sim_termio="" +AC_MSG_CHECKING(for struct termios) +AC_CACHE_VAL(ac_cv_termios_struct, +[AC_TRY_COMPILE([#include <sys/types.h> +#include <sys/termios.h>], +[static struct termios x; + x.c_iflag = 0; + x.c_oflag = 0; + x.c_cflag = 0; + x.c_lflag = 0; + x.c_cc[NCCS] = 0;], +ac_cv_termios_struct=yes, ac_cv_termios_struct=no)]) +AC_MSG_RESULT($ac_cv_termios_struct) +if test $ac_cv_termios_struct = yes; then + sim_termio="$sim_termio -DHAVE_TERMIOS_STRUCTURE" +fi + +if test "$ac_cv_termios_struct" = "yes"; then + AC_MSG_CHECKING(for c_line field in struct termios) + AC_CACHE_VAL(ac_cv_termios_cline, + [AC_TRY_COMPILE([#include <sys/types.h> +#include <sys/termios.h>], +[static struct termios x; x.c_line = 0;], + ac_cv_termios_cline=yes, ac_cv_termios_cline=no)]) + + AC_MSG_RESULT($ac_cv_termios_cline) + if test $ac_cv_termios_cline = yes; then + sim_termio="$sim_termio -DHAVE_TERMIOS_CLINE" + fi +else + ac_cv_termios_cline=no +fi + +if test "$ac_cv_termios_struct" != "yes"; then + AC_MSG_CHECKING(for struct termio) + AC_CACHE_VAL(ac_cv_termio_struct, + [AC_TRY_COMPILE([#include <sys/types.h> +#include <sys/termio.h>], +[static struct termio x; + x.c_iflag = 0; + x.c_oflag = 0; + x.c_cflag = 0; + x.c_lflag = 0; + x.c_cc[NCC] = 0;], +ac_cv_termio_struct=yes, ac_cv_termio_struct=no)]) + AC_MSG_RESULT($ac_cv_termio_struct) + if test $ac_cv_termio_struct = yes; then + sim_termio="$sim_termio -DHAVE_TERMIO_STRUCTURE" + fi +else + ac_cv_termio_struct=no +fi + +if test "$ac_cv_termio_struct" = "yes"; then + AC_MSG_CHECKING(for c_line field in struct termio) + AC_CACHE_VAL(ac_cv_termio_cline, + [AC_TRY_COMPILE([#include <sys/types.h> +#include <sys/termio.h>], +[static struct termio x; x.c_line = 0;], + ac_cv_termio_cline=yes, ac_cv_termio_cline=no)]) + + AC_MSG_RESULT($ac_cv_termio_cline) + if test $ac_cv_termio_cline = yes; then + sim_termio="$sim_termio -DHAVE_TERMIO_CLINE" + fi +else + ac_cv_termio_cline=no +fi + AC_SUBST(CC_FOR_BUILD) AC_SUBST(CFLAGS) AC_SUBST(HDEFINES) @@ -439,24 +526,7 @@ AC_SUBST(sim_model) AC_SUBST(sim_default_model) AC_SUBST(sim_model_issue) AC_SUBST(sim_stdio) - -AC_STRUCT_ST_BLKSIZE -AC_STRUCT_ST_BLOCKS -AC_STRUCT_ST_RDEV -AC_STRUCT_TIMEZONE - -AC_TYPE_GETGROUPS -AC_TYPE_MODE_T -AC_TYPE_OFF_T -AC_TYPE_PID_T -AC_TYPE_SIGNAL -AC_TYPE_SIZE_T -AC_TYPE_UID_T - -AC_CHECK_FUNCS(cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink) - -AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h) -AC_HEADER_DIRENT +AC_SUBST(sim_termio) AC_OUTPUT(Makefile, [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) |