git clone --recursive https://github.com/autoconf-archive/autoconf-archive
./configure
make
sudo make install

example

confugre.ac

AC_PREREQ([2.69])

AC_INIT([hello], [1.0.0], [This email address is being protected from spambots. You need JavaScript enabled to view it.], [hello],[https://linuxnasm.be])

#AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS], [TAR-NAME],[URL])
#AC_PACKAGE_NAME, PACKAGE_NAME Exactly package.
#AC_PACKAGE_TARNAME, PACKAGE_TARNAME Exactly tarname, possibly generated from package.
#AC_PACKAGE_VERSION, PACKAGE_VERSION Exactly version.
#AC_PACKAGE_STRING, PACKAGE_STRING Exactly ‘package version’.
#AC_PACKAGE_BUGREPORT, PACKAGE_BUGREPORT Exactly bug-report, if one was provided.
#AC_PACKAGE_URL, PACKAGE_URL Exactly url, if one was provided. If url was empty, but package begins with ‘GNU ’, then this defaults to ‘http://www.gnu.org/software/tarname/’, otherwise, no URL is assumed.

AX_PROG_NASM([nasm_avail="no"])

PACKAGE_LDFLAGS="-m elf_x86_64 -g -no-pie"
PACKAGE_NASMFLAGS="-f elf64 -F dwarf -g"

AC_SUBST([PACKAGE_LDFLAGS])
AC_SUBST([PACKAGE_NASMFLAGS])

AM_INIT_AUTOMAKE(foreign)
#hello_SOURCES=hello.asm
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
Makefile.am
 
NASM = /usr/bin/nasm
LD = /usr/bin/ld
bin_PROGRAMS = hello
hello_NASMFLAGS = @PACKAGE_NASMFLAGS@
hello_LDFLAGS = @PACKAGE_LDFLAGS@ -no-pie
hello_SOURCES = hello.asm

.asm.o:
$(NASM)$(hello_NASMFLAGS) $< -o $@
 
hello$(EXEEXT): hello.o
ld $(LDFLAGS) $^ -o $@
 
no-debug: hello
strip -s hello
 
clean:
rm -rf $(hello_OBJS) hello$(EXEEXT)