summaryrefslogtreecommitdiff
path: root/sim/rx
diff options
context:
space:
mode:
authorMasaki Muranaka <monaka@sourceware.org>2010-02-14 07:37:11 +0000
committerMasaki Muranaka <monaka@sourceware.org>2010-02-14 07:37:11 +0000
commit2388a1526b1019b47836c395d28a1e57073dc61b (patch)
treea0e6a6f666cab03301a8fcdbb87d5897113defd3 /sim/rx
parent22e041e26738fc4fab6cbabba9c5ce88e535a83f (diff)
downloadbinutils-gdb-2388a1526b1019b47836c395d28a1e57073dc61b.tar.gz
* 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.
Diffstat (limited to 'sim/rx')
-rw-r--r--sim/rx/ChangeLog9
-rw-r--r--sim/rx/config.in107
-rwxr-xr-xsim/rx/configure13
-rw-r--r--sim/rx/configure.in1
-rw-r--r--sim/rx/main.c8
5 files changed, 138 insertions, 0 deletions
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 <monaka@monami-software.com>
+
+ * 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 <ysato@users.sourceforge.jp>
* 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 <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <fpu_control.h> header file. */
+#undef HAVE_FPU_CONTROL_H
+
+/* Define to 1 if you have the <getopt.h> 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 <inttypes.h> 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 <memory.h> 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 <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> 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 <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <zlib.h> 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 <http://www.gnu.org/licenses/>. */
+#include "config.h"
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <assert.h>
#include <setjmp.h>
#include <signal.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
#include "bfd.h"