Add preprocessor macro OS_COMPILED

This commit is contained in:
Holger Vogt 2019-12-30 18:36:19 +01:00
parent c42b4884b4
commit d2403bfb40
1 changed files with 26 additions and 0 deletions

View File

@ -296,6 +296,32 @@ else
dprefix=$prefix
fi
####
### check for operating system at compile time
case $host_os in
*mingw* | *msys* )
AC_DEFINE([OS_COMPILED], [1], [MINGW for MS Windows])
;;
*cygwin* )
AC_DEFINE([OS_COMPILED], [2], [Cygwin for MS Windows])
;;
*freebsd* )
AC_DEFINE([OS_COMPILED], [3], [FreeBSD])
;;
*openbsd* )
AC_DEFINE([OS_COMPILED], [4], [OpenBSD])
;;
*solaris* )
AC_DEFINE([OS_COMPILED], [5], [Solaris])
;;
*linux* )
AC_DEFINE([OS_COMPILED], [6], [Linux])
;;
* )
AC_DEFINE([OS_COMPILED], [7], [Other Operating System])
;;
esac
##########################################################################
#
# ngspice as shared library (ngspice.so or ngspice.dll)