From: Masaki Muranaka Date: Sun, 14 Feb 2010 07:37:11 +0000 (+0000) Subject: * configure.in: Check if the host has getopt.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2388a1526b1019b47836c395d28a1e57073dc61b;p=binutils-gdb.git * configure.in: Check if the host has getopt.h. * configure: Regenerate. * config.in: Regenerate. * main.c: Include config.h. Use HAVE_STDLIB_H, HAVE_UNISTD_H, HAVE_GETOPT_H. Include getopt.h in case HAVE_GETOPT_H is defined. --- diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog index bb3b45153d4..c1a2675af54 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,12 @@ +2010-01-30 Masaki Muranaka + + * configure.in: Check if the host has getopt.h. + * configure: Regenerate. + * config.in: Regenerate. + * main.c: Include config.h. + Use HAVE_STDLIB_H, HAVE_UNISTD_H, HAVE_GETOPT_H. + Include getopt.h in case HAVE_GETOPT_H is defined. + 2009-12-22 Yoshinori Sato * rx/rx.c (decode_opcode): btst bit address mask fix. diff --git a/sim/rx/config.in b/sim/rx/config.in index e69de29bb2d..f71c45f776f 100644 --- a/sim/rx/config.in +++ b/sim/rx/config.in @@ -0,0 +1,107 @@ +/* config.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERRNO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FPU_CONTROL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GETOPT_H + +/* Define to 1 if you have the `getrusage' function. */ +#undef HAVE_GETRUSAGE + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the `time' function. */ +#undef HAVE_TIME + +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_ZLIB_H + +/* Define to 1 if you have the `__setfpucw' function. */ +#undef HAVE___SETFPUCW + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Additional package description */ +#undef PKGVERSION + +/* Bug reporting address */ +#undef REPORT_BUGS_TO + +/* Define as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS diff --git a/sim/rx/configure b/sim/rx/configure index 58e42de3061..56d03ac73e6 100755 --- a/sim/rx/configure +++ b/sim/rx/configure @@ -4517,6 +4517,19 @@ sim_link_files="${sim_link_files} ${TARG_VALS_DEF}" sim_link_links="${sim_link_links} targ-vals.def" +for ac_header in getopt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" +if test "x$ac_cv_header_getopt_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_H 1 +_ACEOF + +fi + +done + + ac_sources="$sim_link_files" ac_dests="$sim_link_links" diff --git a/sim/rx/configure.in b/sim/rx/configure.in index c97270ae3a4..7c518154978 100644 --- a/sim/rx/configure.in +++ b/sim/rx/configure.in @@ -21,6 +21,7 @@ dnl AC_PREREQ(2.5)dnl AC_INIT(Makefile.in) AC_CONFIG_HEADER(config.h:config.in) +AC_CHECK_HEADERS(getopt.h) sinclude(../common/aclocal.m4) diff --git a/sim/rx/main.c b/sim/rx/main.c index 350c7ae6028..a83794e760b 100644 --- a/sim/rx/main.c +++ b/sim/rx/main.c @@ -19,13 +19,21 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include "config.h" #include #include +#ifdef HAVE_STDLIB_H #include +#endif +#ifdef HAVE_UNISTD_H #include +#endif #include #include #include +#ifdef HAVE_GETOPT_H +#include +#endif #include "bfd.h"