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

Add fake OSMAJORVERSION/OSMINORVERSION CPP flags

These really need to go away and are primarily used by older
unsupported platforms.

Here we fake these for Linux (4.15), freebsd (10.0), openbsd (6.2),
netbsd (8.0), and solaris (5.10).

I'm not sure about the Solaris one as I don't have any of them.
Basically, anything after Solaris 5.10, which is pretty ancient.

These should be considered temporary - all uses of these macros in the
code should be removed in favor of functionality-specific checks in
configure.
This commit is contained in:
Jon Trulson 2019-10-25 18:25:06 -06:00
parent 0d78e17036
commit 4320036bfa

View file

@ -32,24 +32,43 @@ build_solaris=no
build_hpux=no
build_aix=no
dnl For now, we need to fake the OSMAJORVERSION, OSMINORVERSION. In Linux
dnl this never mattered anyway as it was always the kernel version. We will
dnl choose defaults here. These need to be removed in the code in favor
dnl of actual checks for functionality. So this should be considered
dnl temporary.
osmajorversion=4
osminorversion=15
case "${host_os}" in
linux*)
build_linux=yes
osmajorversion=4
osminorversion=15
;;
freebsd*)
build_freebsd=yes
bsd=yes
osmajorversion=10
osminorversion=0
;;
openbsd*)
build_openbsd=yes
bsd=yes
osmajorversion=6
osminorversion=2
;;
netbsd*)
build_netbsd=yes
bsd=yes
osmajorversion=8
osminorversion=0
;;
solaris*|sun*)
build_solaris=yes
osmajorversion=5
osminorversion=10
;;
aix*)
build_aix=yes
@ -68,6 +87,12 @@ AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"])
AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"])
AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"])
dnl Add osmajor/minor version to cppflags.
oflags="$CPPFLAGS"
CPPFLAGS="$oflags -DOSMAJORVERSION=$osmajorversion \
-DOSMINORVERSION=$osminorversion"
dnl set CSRG_BASED define for the BSD's
if test "$build_bsd" = "yes"
then