1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-10 15:54:17 +01:00

Configure: Changed OS dependant check to use Autoconf's macro

The macro provided by Autoconf will generate a similar code but
with better portability, and the source file is more consistent.
This commit is contained in:
Christophe CURIS
2013-05-10 18:35:41 +02:00
committed by Carlos R. Mafra
parent e7c2a3dc69
commit 7e424bf232

View File

@@ -92,38 +92,15 @@ AX_CFLAGS_GCC_OPTION(-Wextra -Wno-sign-compare -Wno-unused-parameter)
dnl Platform-specific Makefile setup
dnl ================================
case "${host}" in
*-*-linux*|*-*-cygwin*|*-gnu*)
WM_OSDEP="linux"
CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600"
;;
*-*-freebsd*|*-k*bsd-gnu*)
WM_OSDEP="bsd"
CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD"
;;
*-*-netbsd*)
WM_OSDEP="bsd"
CFLAGS="$CFLAGS -DNETBSD"
;;
*-*-openbsd*)
WM_OSDEP="bsd"
CFLAGS="$CFLAGS -DOPENBSD"
;;
*-*-dragonfly*)
WM_OSDEP="bsd"
CFLAGS="$CFLAGS -DDRAGONFLYBSD"
;;
*-apple-darwin*)
WM_OSDEP="darwin"
;;
*-*-solaris*)
WM_OSDEP="stub" # solaris.c when done
;;
*)
WM_OSDEP="stub"
;;
esac
AS_CASE(["$host"],
[*-*-linux*|*-*-cygwin*|*-gnu*], [WM_OSDEP="linux" ; CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600"],
[*-*-freebsd*|*-k*bsd-gnu*], [WM_OSDEP="bsd" ; CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -DFREEBSD"],
[*-*-netbsd*], [WM_OSDEP="bsd" ; CFLAGS="$CFLAGS -DNETBSD"],
[*-*-openbsd*], [WM_OSDEP="bsd" ; CFLAGS="$CFLAGS -DOPENBSD"],
[*-*-dragonfly*], [WM_OSDEP="bsd" ; CFLAGS="$CFLAGS -DDRAGONFLYBSD"],
[*-apple-darwin*], [WM_OSDEP="darwin"],
[*-*-solaris*], [WM_OSDEP="stub"], dnl solaris.c when done
[WM_OSDEP="stub"])
AC_SUBST(WM_OSDEP)