Hi Nick, Taking all your comments into account, my current configure.ac is: #!/bin/bash AC_INIT([src], [0.4],[], [kmc],[]) AC_LANG([Fortran]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 subdir-objects foreign]) #AC_SEARCH_LIBS([dsyev_], [lapack], ,AC_MSG_ERROR([No LAPACK library])) AC_PROG_FC([ifort gfortran]) AC_OPENMP printf 'OPENMP_FCFLAGS = %s\n' "$OPENMP_FCFLAGS" FCFLAGS="$OPENMP_FCFLAGS -fcheck=all" if test $FC == "ifort"; then FCFLAGS="$OPENMP_FCFLAGS -check all" fi AC_CHECK_PROG([DEPF90_CHECK],[makedepf90],[yes],[no]) AM_CONDITIONAL([FOUND_MAKEDEPF90], [test "x$DEPF90_CHECK" = xyes]) AC_CONFIG_FILES([ Makefile ]) AC_OUTPUT Here also, `AC_LANG` is crashing the make: ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for ifort... ifort checking whether the Fortran compiler works... yes checking for Fortran 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 we are using the GNU Fortran compiler... no checking whether ifort accepts -g... yes checking for ifort option to support OpenMP... -fopenmp OPENMP_FCFLAGS = -fopenmp checking for makedepf90... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged $make Makefile:752: *** missing separator. Stop. if I just comment out AC_LANG line, then, as you said, OPENMP_FCFLAGS doesnot have a value: checking whether we are using the GNU Fortran compiler... no checking whether ifort accepts -g... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... none checking for gcc option to support OpenMP... -fopenmp OPENMP_FCFLAGS = checking for makedepf90... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands But the make is running: make make all-am ... make[1]: Leaving directory '/home/rudra/Devel/kmc/NEW' The difference between the configure.ac is the AC_LANG is commented; Nothing else has been changed in this two. Please comment. On Thu, 2016-06-23 at 10:24 -0400, Nick Bowler wrote: > Hello, > > The tests performed by AC_OPENMP (and the variables set) depend on > the current language. You have not posted a complete, compilable > configure.ac, but unless you've done something else to switch the > language, the default language is C. > > It's also strange to test for openmp before testing the compiler -- > this will probably not do what you intended. Also, you are testing > for modern Fortran (AC_PROG_FC) yet OPENMP_FFLAGS is for Fortan 77, > which is probably not what you wanted. > > Try this: > > AC_INIT([test], [0]) > > AC_LANG([Fortran]) > AC_PROG_FC > AC_OPENMP > > printf 'OPENMP_FCFLAGS = %s\n' "$OPENMP_FCFLAGS" > > AC_OUTPUT > > Cheers, > Nick _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf