1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

configure: Several changes related to locating cpp and ksh

For ksh, we need a full pathname.  AC_CHECK_PROGS only sets the name,
so we can't use that (think of a "#!" in a shell script.

We use some shell scripting to locate the ksh pathname.

While on that subject, the current use of CPP (gcc -E) as a general
preprocessor does not work very well.  I messes up whitespace,
adds/translates random whitespace, and complains bitterly about single
quotes (') in various places like comments.  It's not usable for what
CDE needs.

So, now we use GENCPP.  Using shell scripting like that used for ksh,
we locate the cpp program, and set GENCPP to "/full/path/to/cpp
-traditional -nostdinc".  This is what Linux uses now in an Imake
build, and it works fine.  We'll have to see what the BSD/Solari do.

We might need to just include BSD's "tradcpp" into the build and use
that.  It too works well in limited testing, but eats blank lines.  We
can live with that if we have to.
This commit is contained in:
Jon Trulson 2019-10-30 17:42:31 -06:00
parent e16ad8120f
commit 2b8803a8fb

View file

@ -206,7 +206,20 @@ 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. We may
dnl just bite the bullet and go with BSD's tradcpp here...
CPP_PATH="`which cpp`"
if test -z "$CPP_PATH"
then
AC_MSG_ERROR([Could not find a C preprocessor (cpp). Please install it.]);
else
AC_SUBST(GENCPP, "$CPP_PATH -traditional -nostdinc", [CPP command])
fi
AM_PROG_LIBTOOL
AC_PROG_YACC
AM_PROG_LEX
@ -238,7 +251,19 @@ AC_PATH_XTRA
AC_FUNC_FORK
dnl programs
AC_CHECK_PROGS(KSH, ksh)
dnl we have to treat ksh specially, as we need it's full path for
dnl various scripts.
KSH_PATH="`which ksh`"
if test -z "$KSH_PATH"
then
AC_MSG_ERROR([Could not find the Korn shell (ksh). Please install it.]);
else
AC_SUBST(KSH, $KSH_PATH, [Path to ksh])
fi
AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
AC_CHECK_PROGS(MKFONTIDR, mkfontdir)
AC_CHECK_PROGS(GZIP, gzip)
@ -368,6 +393,7 @@ programs/dtfile/dtcopy/Makefile
programs/dtwm/Makefile
programs/dtlogin/Makefile
programs/dtlogin/config/Makefile
])