1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

configure: set a compiler search option

... and move the PROG_CC and PROG_CXX checks toward the beginning.
Without the move the compiler search arguments are ignored.  We search
for 'cc gcc clang' and 'c++ g++ clang++', in that order for CC and CXX
respectively.

This means there should be no need to override the CC
and CXX variables on the configure command line for BSD systems.

On OpenBSD for example, cc links to clang.  On Linux, cc links to
gcc.  You can still override these if you like with CC=... and
CXX=... on the configure command line.

gmake (MAKE=gmake) still needs to be used on the BSD's though.

With these and previous changes, CDE builds, installs, and runs
correctly on OpenBSD 6.5 now.
This commit is contained in:
Jon Trulson 2019-12-15 12:47:57 -07:00
parent dd729a7be9
commit 6c0c619df3

View file

@ -2,6 +2,11 @@ AC_INIT([cde-desktop], [2.3.1], [jon@radscan.com])
AC_CONFIG_HEADERS([include/autotools_config.h])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects])
dnl These must be up here for the compiler search list to actually work
AC_PROG_CC([cc gcc clang])
AC_PROG_CXX([c++ g++ clang++])
LT_INIT
AC_PREFIX_DEFAULT(/usr/dt)
@ -218,9 +223,6 @@ AC_SUBST(CDE_CONFIGURATION_TOP)
AC_SUBST(CDE_LOGFILES_TOP)
AC_SUBST(CDE_USER_TOP)
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
dnl we need a real preprocessor, not gcc -E. We will call it GENCPP.
@ -320,7 +322,7 @@ dnl deal, or modify them here directly.
CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
LIBS="${LIBS} ${PTHREAD_LIBS}"
LIBS="${X_LIBS} ${LIBS} ${PTHREAD_LIBS}"
dnl All of the makefiles we need to generate go here...
AC_CONFIG_FILES([