autoconf improvements: @SET_MAKE@, library extension

Minor autoconf corner cases.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2016-03-09 14:11:40 -08:00
parent 65808c983a
commit 89c1770e14
4 changed files with 27 additions and 2 deletions

View File

@ -6,6 +6,8 @@
# redistributable under the license given in the file "LICENSE"
# distributed in the NASM archive.
@SET_MAKE@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
@ -48,7 +50,7 @@ FIND = find
# Binary suffixes
O = @OBJEXT@
X = @EXEEXT@
A = a
A = @LIBEXT@
# Debug stuff
ifeq ($(TRACE),1)

20
aclocal.m4 vendored
View File

@ -27,3 +27,23 @@ AC_MSG_RESULT([yes])
AC_DEFINE(m4_toupper([HAVE_$1]), [1],
[Define to 1 if you have the `$1' intrinsic function.]),
AC_MSG_RESULT([no]))])
dnl --------------------------------------------------------------------------
dnl PA_LIBEXT
dnl
dnl Guess the library extension based on the object extension
dnl --------------------------------------------------------------------------
AC_DEFUN(PA_LIBEXT,
[AC_MSG_CHECKING([for suffix of library files])
if test x"$LIBEXT" = x; then
case "$OBJEXT" in
obj )
LIBEXT=lib
;;
*)
LIBEXT=a
;;
esac
fi
AC_MSG_RESULT([$LIBEXT])
AC_SUBST([LIBEXT])])

View File

@ -62,6 +62,9 @@ else
fi
AC_PROG_INSTALL
dnl Check for library extension
PA_LIBEXT
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE

View File

@ -45,7 +45,7 @@ LIBS = $(RDFLIB) $(NASMLIB)
# Binary suffixes
O = @OBJEXT@
X = @EXEEXT@
A = a
A = @LIBEXT@
PROGRAMS = rdfdump$(X) ldrdf$(X) rdx$(X) rdflib$(X) \
rdf2bin$(X) rdf2com$(X) rdf2ith$(X) rdf2ihx$(X) rdf2srec$(X)