Compilation issues under Linux

I downloaded the tar.gz for 0.20.2. I run:

./configure --prefix=/full_path_to/install_location

It configures fine. However when I run make, it tries to reconfigure again calling aclocal-1.15 and autoconf.

$ make

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/gga/code_smb/applications/Ubuntu20/mrv/SuperBuild/BUILD/Linux-3.10.0-1160.71.1.el7.x86_64-64/Release/tmp/LibRaw-prefix/src/LibRaw-0.20.2/missing aclocal-1.15 -I m4
cd . && /bin/sh /home/gga/code_smb/applications/Ubuntu20/mrv/SuperBuild/BUILD/Linux-3.10.0-1160.71.1.el7.x86_64-64/Release/tmp/LibRaw-prefix/src/LibRaw-0.20.2/missing automake-1.15 --foreign
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/gga/code_smb/applications/Ubuntu20/mrv/SuperBuild/BUILD/Linux-3.10.0-1160.71.1.el7.x86_64-64/Release/tmp/LibRaw-prefix/src/LibRaw-0.20.2/missing autoconf
configure.ac:16: error: possibly undefined macro: AC_SUBST
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:41: error: possibly undefined macro: AC_MSG_WARN
make: *** [configure] Error 1

After updating to autoconf 2.71, I get more errors:

CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/gga/LibRaw-0.20.2/missing aclocal-1.15 -I m4
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
cd . && /bin/sh /home/gga/LibRaw-0.20.2/missing automake-1.15 --foreign
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/gga/LibRaw-0.20.2/missing autoconf
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:16: error: possibly undefined macro: AC_SUBST
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:41: error: possibly undefined macro: AC_MSG_WARN
make: *** [configure] Error 1

Forums: 

autoreconf --install and then configure

I also tried autoreconf --install and then running configure.

I got:

$ autoreconf --install

configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
libtoolize: `./ltmain.sh' is newer: use `--force' to overwrite
libtoolize: `m4/libtool.m4' is newer: use `--force' to overwrite
libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite
libtoolize: `m4/ltversion.m4' is newer: use `--force' to overwrite
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:11: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:11: You should run autoupdate.
m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:11: the top level
configure.ac:14: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level
configure.ac:14: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:14: put the 'win32-dll' option into LT_INIT's first parameter.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
m4/ltoptions.m4:148: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:14: the top level

$ configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... -std=gnu11
checking whether gcc -std=gnu11 understands -c and -o together... yes
checking dependency style of gcc -std=gnu11... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu11... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu11 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu11 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu11 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu11 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu11 static flag -static works... no
checking if gcc -std=gnu11 supports -c -o file.o... yes
checking if gcc -std=gnu11 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu11 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for OpenMP flag of C compiler... -fopenmp
checking for jpeg_mem_src in -ljpeg... no
configure: WARNING: libjpeg not found
checking for jas_init in -ljasper... no
configure: WARNING: libjasper not found
./configure: line 17242: syntax error near unexpected token `ZLIB,zlib,'
./configure: line 17242: ` PKG_CHECK_MODULES(ZLIB,zlib,'

Сheck that the toolchain

Сheck that the toolchain (autotools, libtool) isn't broken.
When the log suggests to run autoupdate, it may make sense to try it (after being sure toolchain is OK, and if the message re autoupdate still appears).

--
Iliah Borg