1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
|
Description: Added autoconf files
Author: NIIBE Yutaka <gniibe@fsij.org>
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@users.sourceforge.net>
Last-Update: 2015-03-26
Bug: https://sourceforge.net/p/gplcver/issues/4
Forwarded: https://sourceforge.net/p/gplcver/issues/4/attachment/autoconf.diffx-FTBFS.patch
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,11 @@
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = src
+
+EXTRA_DIST = $(top_srcdir)/LICENSE $(top_srcdir)/NEW.CVER.2001.RELEASE.NOTES \
+ $(top_srcdir)/OUR_PHILOSOPHY \
+ $(top_srcdir)/dinotrace.dir $(top_srcdir)/pli_incs \
+ $(top_srcdir)/pli_src \
+ $(top_srcdir)/tests_and_examples \
+ $(top_srcdir)/vcddiff.dir \
+ $(top_srcdir)/ver_src
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,60 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT(cver, 2.11a, gniibe@fsij.org)
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([src/cver.c])
+AC_CONFIG_HEADER([src/config.h])
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+# fcntl.h limits.h stdlib.h string.h unistd.h sys/time.h sys/timeb.h
+# AC_CHECK_HEADERS([ ])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_TYPE_OFF_T
+AC_HEADER_TIME
+
+# Checks for library functions.
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_REALLOC
+AC_TYPE_SIGNAL
+AC_FUNC_STAT
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([getcwd gettimeofday memmove memset strchr strerror strrchr])
+
+# Checks for endianess
+AC_C_BIGENDIAN
+
+AC_OUTPUT(Makefile src/Makefile)
+
+# ??? drem --> remainder
+#
+# tolower, time, ...
+#
+# Check info page of AC_HEADER_DIRENT
+#
+# __ELF__ cver.c
+# __CYGWIN32__ cver.c v.h v_fx.c v_src3.c
+#
+# INTSIGS cver.c v_dbg.c v_ex.c v_sim.c
+# __FreeBSD__ cver.c v.h
+# __STATIC_PLI__ cver.c v_tf.c v_vpi.c
+# __SVR4 cver.c v_cnv.c v_dbg.c v_dbg2.c v_del.c v_ex2.c v_fx.c v_ms.c v_sdf.c v_src3.c
+# __hpux cver.c v_cnv.c v_del.c v_fx.c v_src3.c
+# __sparc cver.c v.h v_dbg.c v_dbg2.c v_ex2.c v_ms.c v_sdf.c v_src3.c
+# __i386__ cver.c v_dbg.c
+# __linux__ cver.c
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,13 @@
+bin_PROGRAMS = cver
+cver_SOURCES = dig_main.c \
+ v.h systsks.h cvmacros.h \
+ cver.c v_src.c v_src2.c v_src3.c \
+ v_fx.c v_fx2.c v_fx3.c v_cnv.c \
+ v_ex.c v_ex2.c v_ex3.c v_ex4.c \
+ v_trch.c v_del.c v_sdf.c v_prp.c \
+ v_prp2.c v_sim.c v_dbg.c v_dbg2.c \
+ v_ms.c v_tf.c v_acc.c v_vpi.c \
+ v_vpi2.c v_vpi3.c
+cver_CFLAGS = -I../pli_incs
+cver_LDADD = -lm -ldl
+cver_LDFLAGS = -export-dynamic
--- /dev/null
+++ b/src/config.h.in
@@ -0,0 +1,165 @@
+/* src/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+#undef HAVE_DOPRNT
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+ to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+ and to 0 otherwise. */
+#undef HAVE_REALLOC
+
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+ zero-length file name argument. */
+#undef HAVE_STAT_EMPTY_STRING_BUG
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* 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 `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* 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 `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_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/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* Name of package */
+#undef PACKAGE
+
+/* 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 version of this package. */
+#undef PACKAGE_VERSION
+
+/* 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
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#undef realloc
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
--- a/src/v.h
+++ b/src/v.h
@@ -1,5 +1,9 @@
/* Copyright (c) 1991-2007 Pragmatic C Software Corp. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
/*
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -95,6 +99,7 @@
/* needed to allow signals to use normal decls */
typedef int32 sighandler();
+#ifndef HAVE_CONFIG_H
#ifndef __sparc
/* BEWARE - assuming all non sparc systems define BYTE_ORDER and endian.h */
/* to PORT change for your system */
@@ -111,27 +116,25 @@
# endif
# endif
# endif
-
-typedef union {
- word64 w64v;
-#if (BYTE_ORDER == BIG_ENDIAN)
- struct { word32 high; word32 low; } w_u;
-#else
- struct { word32 low; word32 high; } w_u;
-#endif
-} w64_u;
+# if (BYTE_ORDER == BIG_ENDIAN)
+# define WORDS_BIGENDIAN 1
+# endif
#else
#include <sys/isa_defs.h>
+# if defined(_BIG_ENDIAN)
+# define WORDS_BIGENDIAN 1
+# endif
+#endif
+#endif
typedef union {
word64 w64v;
-#if defined(_BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
struct { word32 high; word32 low; } w_u;
#else
struct { word32 low; word32 high; } w_u;
#endif
} w64_u;
-#endif
#define TRUE 1
#define FALSE 0
--- a/src/v_cnv.c
+++ b/src/v_cnv.c
@@ -1624,7 +1624,7 @@
/* ---
INVERSE:
-#if (BYTE_ORDER == BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
| ((b4 & 0xff) << 24);
#else
@@ -1648,7 +1648,7 @@
{
wrd = ap[wi] & (bp[wi] ^ 0xffffffff);
-#if (BYTE_ORDER != BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
for (j = 24; j >= 0; j -= 8)
{
bval = (wrd >> j) & 0xff;
@@ -1678,7 +1678,7 @@
for (wi = 0; wi < wlen_(blen); wi++)
{
-#if (BYTE_ORDER != BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
for (j = 24; j >= 0; j -= 8)
{
bval = (ap[wi] >> j) & 0xff;
--- a/src/v_dbg.c
+++ b/src/v_dbg.c
@@ -34,11 +34,6 @@
#include <string.h>
#include <ctype.h>
-#ifdef __linux__
-#include <sys/types.h>
-#include <sys/wait.h>
-#endif
-
#include <signal.h>
#include <unistd.h>
--- a/src/v_ex.c
+++ b/src/v_ex.c
@@ -8492,7 +8492,7 @@
b3 = (word32) c;
if ((c = scanf_getc(f)) == EOF) return(NULL);
b4 = (word32) c;
-#if (BYTE_ORDER == BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
| ((b4 & 0xff) << 24);
#else
@@ -8526,7 +8526,7 @@
b3 = (word32) c;
if ((c = scanf_getc(f)) == EOF) return(NULL);
b4 = (word32) c;
-#if (BYTE_ORDER == BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
| ((b4 & 0xff) << 24);
#else
@@ -8543,7 +8543,7 @@
b3 = (word32) c;
if ((c = scanf_getc(f)) == EOF) return(NULL);
b4 = (word32) c;
-#if (BYTE_ORDER == BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
wrd2 = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
| ((b4 & 0xff) << 24);
#else
--- a/src/v_fx.c
+++ b/src/v_fx.c
@@ -37,7 +37,7 @@
#include <sys/types.h>
-#if defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
+#if defined(HAVE_DIRENT_H) || defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
#include <dirent.h>
#else
#include <sys/dir.h>
@@ -798,7 +798,7 @@
register int32 last_fi;
register int32 numdfils, siz_mydir, bytlen, obytlen;
DIR *dirp;
-#if defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
+#if defined(HAVE_DIRENT_H) || defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
struct dirent *dp;
#else
/* all BSD cases and special case interface for non unices */
--- a/src/v_src3.c
+++ b/src/v_src3.c
@@ -40,7 +40,7 @@
#include <sys/stat.h>
#endif
-#if defined(__CYGWIN32__) || defined(__SVR4) || defined(__hpux)
+#if defined(HAVE_DIRENT_H) || defined(__CYGWIN32__) || defined(__SVR4) || defined(__hpux)
#include <dirent.h>
#else
#include <sys/dir.h>
|