Bruno Haible <bruno@xxxxxxxxx> writes: >> How would one use OPENMP_CFLAGS? Does -fopenmp need to be added to >> both CFLAGS and CPPFLAGS? Is that why it's not merely put into >> CFLAGS? > > It's needed for compiling and for linking. As far as I can tell, it's not > needed for preprocessing, since <omp.h> is found in the compiler's search > path anyway. Thanks, but earlier you mentioned the _OPENMP macro -- is that defined by <omp.h>, or is it predefined by cpp? I just now checked <http://docs.hp.com/en/B3901-90012/ch08s05.html>, and it implies (though it doesn't say) that _OPENMP is predefined by cpp. If so, OPENMP_CFLAGS needs to be put into CPPFLAGS too, and the problem needs to be documented. > When an app doesn't use OpenMP (i.e. contains no #pragma omp and no use of > <omp.h>), compiling with -fopenmp has no effect on the generated code. In this case, I don't see the downside of having 'configure' manipulate CC, CFLAGS, and/or CPPFLAGS to use the -fopenmp option uniformly for all compiles. This should be simpler and more reliable than requiring the developer to put $(OPENMP_CFLAGS) all over the place. And it should address the CFLAGS/CPPFLAGS issue as well. _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf