Commit Graph

43 Commits

Author SHA1 Message Date
H. Peter Anvin
4627e695a5 Portability improvements to nasm_realpath()
Try harder to nasm_realpath() to be as portable as possible.  Move it
to a separate file since it has gotten complex enough that it is
cleaner that way.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-01-26 12:01:34 -08:00
H. Peter Anvin
03f229c74f Restore AC_C_INLINE
Checkin 7729edf722 removed AC_C_INLINE,
presumably inadvertently.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2015-11-04 11:41:33 -08:00
Cyrill Gorcunov
7729edf722 configure.in: Move AC_C_INLINE and friends to be checked before PA_ADD_CFLAGS
Looks like -Werror=missing-declarations revealed problem in
configure: the "inline" support has not been detected properly
leading to problem in building procedure.

Lets move AC_C_INLINE and etc to be tested before gcc flags.

Reported-by: NAKAI Yuta <nak5124@live.jp>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2014-12-20 11:35:51 +03:00
H. Peter Anvin
cfe039f69b configure.in: Remove redundant -Werror=trigraphs
As obnoxious as trigraphs are, we don't need to -Werror them twice.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-11-25 13:05:32 -08:00
H. Peter Anvin
236f7949e4 configure.in: promote some C warnings to errors
Promote some C warnings to errors, especially ones relating to missing
prototypes.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-11-25 12:14:52 -08:00
H. Peter Anvin
d089c2251b Revert "build: Include pregenerated nasm manpages"
This reverts commit 99427bdb6c.

We don't include generated files in the repository, instead we should
pregenerate them for the tarball generation, just as we do for the
Perl-generated files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-10-24 13:22:19 +01:00
Cyrill Gorcunov
99427bdb6c build: Include pregenerated nasm manpages
It's been reported that force people to install
asciidoc for man pages generation is not acceptible.
Just ship them pregenerated.

http://bugzilla.nasm.us/show_bug.cgi?id=3392262

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-22 10:09:35 +04:00
Cyrill Gorcunov
ce074db7c2 autoconf: Warn a user if no asciidoc/xmlto found
It's been noticed on nasm forum that we don't complain
if no asciidoc/xmlto package installed on a system while
they are required for man pages generation.

So warn a user then, but still allow to build nasm.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-05 01:33:09 +04:00
H. Peter Anvin
a9397830f7 Make the errors for missing man page tools comprehensible
A lot of confusion was had due to missing asciidoc...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-05-17 12:03:24 -07:00
Cyrill Gorcunov
1a63699ce5 man: Generate manpages from asciidoc format
The asciidoc format is a way more easier to read
by a human.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-02-17 22:50:19 +04:00
Cyrill Gorcunov
325768ed4c autoconf: Add --with-ccache option
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:02 +03:00
H. Peter Anvin
eaa68f1c85 Add strlcpy() function
Add strlcpy() function and implementation, and use configure to detect
if strlcpy() is natively available on the system.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-08-10 15:59:34 -07:00
H. Peter Anvin
1fb908c0db autoconf: detect the broken bool in OpenWatcom 1.8
OpenWatcom 1.8 has a C99 mode, which implements _Bool and
<stdbool.h>.  Unfortunately the implementation is broken, and doesn't
let _Bool be implicitly converted to integer (as required by the C99
spec).  Detect this case in autoconf.
2009-03-01 13:57:40 -08:00
H. Peter Anvin
eec3b52505 doc: for ps to pdf conversion, use "acrodist", "ps2pdf" or "pstopdf"
For PostScript to PDF conversion, use whichever of "acrodist",
"ps2pdf", or "pstopdf" which we can find on the system.  I haven't
tried either acrodist or pstopdf myself, only going my the
documentation, but prefer acrodist since it is claimed to produce
smaller output files than ps2pdf.
2008-06-19 11:39:23 -07:00
H. Peter Anvin
11e6c85b09 Fix typo: s/most/least/
Littleendian = least signficant byte first
2008-06-10 14:41:43 -07:00
H. Peter Anvin
253a4e7a9f Make it possible to use "inline" and "restrict"
Put the appropriate machinery in place to be able to use the "inline"
and "restrict" keywords with appropriate semantics.
2008-06-10 13:00:27 -07:00
H. Peter Anvin
2f0f9ea286 Use autoconf to detect WORDS_LITTLEENDIAN
Use autoconf to detect littleendian word order, and use
WORDS_LITTLEENDIAN instead of X86_MEMORY when we don't require
unaligned memory accesses to be permitted.
2008-06-08 20:53:29 -07:00
H. Peter Anvin
c13d31a907 Better handling of platforms which hide "extended" functionality
Some platforms apparently feel -std=c99, which defines
__STRICT_ANSI__, should also hide a bunch of function prototypes.
This rather sucks.  At least try to deal with it.

MinGW and DJGPP both have this problem, in particular.
2007-10-26 18:49:29 -07:00
H. Peter Anvin
26573020d8 Cleaner solution for MinGW handling of __STRICT_ANSI__
If MinGW is detected, undefine __STRICT_ANSI__ in compiler.h instead.
2007-10-18 19:14:08 -07:00
H. Peter Anvin
8088815922 configure: Undefine __STRICT_ANSI__ for mingw's benefit
mingw makes a bunch of prototypes unavailable if __STRICT_ANSI__ is
defined.  However, they are still detected by configure, which causes
us pain.
2007-10-18 19:14:08 -07:00
H. Peter Anvin
70a5d14b89 autoconf: drop AC_USE_SYSTEM_EXTENSIONS to support autoconf 2.59
AC_USE_SYSTEM_EXTENSIONS requires autoconf 2.61, which is still a
little too new, apparently.  Unless we have a specific reason to
include it, don't.
2007-10-13 23:12:46 -07:00
H. Peter Anvin
6867acc18e Use the compiler-provided booleans if available, otherwise emulate
Both C and C++ have "bool", "true" and "false" in lower case; C
requires <stdbool.h> for this, in C++ it is an inherent type built
into the compiler.  Use those instead of the old macros; emulate with
a simple typedef enum if unavailable.
2007-10-10 14:58:45 -07:00
H. Peter Anvin
38a1b8ae9f configure.in: looks like we need autoconf 2.61 :(
AC_USE_SYSTEM_EXTENSIONS is really, *really* useful, but apparently
requires autoconf 2.61...
2007-10-10 14:29:53 -07:00
H. Peter Anvin
8f303505ea Use autoconf to request feature macros 2007-10-03 17:40:12 -07:00
H. Peter Anvin
fe501957c0 Portability fixes
Concentrate compiler dependencies to compiler.h; make sure compiler.h
is included first in every .c file (since some prototypes may depend
on the presence of feature request macros.)

Actually use the conditional inclusion of various functions (totally
broken in previous releases.)
2007-10-02 21:53:51 -07:00
H. Peter Anvin
a3d1ccd8ab configure.in: AC_SUBST_FILE should have been AC_SUBST
AC_SUBST_FILE happened to work in autoconf 2.59, but is broken in
autoconf 2.61.
2007-09-28 20:17:12 -07:00
H. Peter Anvin
304b605563 Add substitutes for snprintf() and vsnprintf()
To deal with fools^Wpeople trying to keep really old systems alive,
create a proper framework for substitution functions, and make it
possible to deal with the lack of snprintf/vsnprintf in particular.
2007-09-28 10:50:20 -07:00
H. Peter Anvin
b8af9aa522 Cleaner way to handle MSVC's _snprintf() underscore damage
Some versions of MSVC have snprintf() and vsnprintf() only with a
leading underscore.  Handle that a bit more cleanly.
2007-09-17 13:53:14 -07:00
H. Peter Anvin
d105682096 Remove $Id$ tags (useless with git)
Remove CVS $Id$ tags, since git doesn't use them.
2007-09-12 21:05:06 -07:00
H. Peter Anvin
52daec56f9 Detect missing <inttypes.h> and include ersatz version if missing 2007-06-21 19:00:12 +00:00
H. Peter Anvin
1ed0387476 Cleaner way to add gcc options
We can actually test for the options being accepted, rather than try
to test for gcc; this handles differences between gcc versions as well
as compilers with a similar command line set.
2007-04-15 22:45:25 +00:00
H. Peter Anvin
1a4440ac58 When compiling with gcc, compile with -W -Wall for maximum warnings. 2007-04-13 19:59:20 +00:00
H. Peter Anvin
038d861ede Remove obsolete types; add <inttypes.h> where needed; header fixes
- Remove obsolete types like "uint32"; use "uint32_t" consistently.
- Make sure we include <inttypes.h> where needed.
- Header file guards should be FOO_H or SUBDIR_FOO_H; _FOO_H infringes
  on the C implementation's namespace and should only be used when
  writing libc!
- Change a few "int8_t" back to "char" where appropriate.  There are
  a lot more places where that should be done, though.
- Clean up the check for getuid/getgid in rdoff/rdlar.h.
2007-04-12 16:54:50 +00:00
Ed Beroset
a5d2945b7b added checks for vsnprintf and snprintf (ISO C99) and changed gcc
compile flag from -ansi to -std=c99
2004-12-15 23:02:20 +00:00
H. Peter Anvin
eea6b7aa7f Make sure autoheader has actually been run by conditionalizing
the running of configure on the existence of config.h.in.
2003-09-08 20:02:10 +00:00
H. Peter Anvin
2ef2f06125 Enable the use of a config.h file and autoheader. At this point we don't
actually *use* the resulting configuration file, but it keeps autoconf
from creating an insanely long compiler command line, which can cause
problems all by itself.  Eventually we can do:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

... to get the same information.
2003-09-01 04:19:37 +00:00
H. Peter Anvin
1170eb6546 Check in the rest of the Cygwin support patch... 2002-05-19 02:26:38 +00:00
H. Peter Anvin
0fcdadeb55 Fix so that the configure.in works with autoconf 2.5x; make sure
"make cleaner" cleans up all that it needs to clean up
2002-05-19 01:57:54 +00:00
H. Peter Anvin
4b563afc81 Handle separate source and object directories correctly. 2002-05-04 00:15:02 +00:00
H. Peter Anvin
41bf8002b2 NASM 0.98 2002-04-30 20:58:18 +00:00
H. Peter Anvin
ef7468f4ec NASM 0.98p7 2002-04-30 20:57:59 +00:00
H. Peter Anvin
620515ab4e NASM 0.98p6 2002-04-30 20:57:38 +00:00
H. Peter Anvin
87bc61964c NASM 0.97 2002-04-30 20:53:16 +00:00