[dia] mingw: configure changes
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] mingw: configure changes
- Date: Sat, 4 Sep 2010 17:58:30 +0000 (UTC)
commit 0bc2c4004b431b026dd4280df659a1bba4ccde6f
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date: Sun Aug 29 16:26:02 2010 +0200
mingw: configure changes
[PATCH 1/6] Make configure succeed with autotools
and mingw and set useful defines
Signed-off-by: Hans Breuer <hans breuer org>
configure.in | 65 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 42 insertions(+), 23 deletions(-)
---
diff --git a/configure.in b/configure.in
index abdf56f..5cc3738 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,22 @@ AC_REVISION($Revision: 1.288 $)
dnl Specify a header configuration file
AM_CONFIG_HEADER(config.h)
+AC_CANONICAL_HOST
+
+case "$host" in
+ *-*-mingw*)
+ os_win32=yes
+ NO_UNDEFINED=-no-undefined
+ ;;
+ *)
+ os_win32=no
+ NO_UNDEFINED=
+ ;;
+esac
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
+AC_SUBST(NO_UNDEFINED)
+
dnl do this check now, to keep autogen quiet.
AC_PROG_CC
dnl also c++
@@ -402,30 +418,33 @@ LIBS="${LIBS} ${Z_LIBS}"
dnl Path to UI resources
AC_SUBST(uidatadir, '${pkgdatadir}/ui')
-
dnl Platform-specific fixes.
-dnl
-
-dnl Sun Forte C provides isinf() in the unbundled -lsunmath. Solaris
-dnl declares finite() in ieeefp.h. It's preferrable not to link
-dnl to -lsunmath as it's not present on all machines.
-have_isinf=no
-AC_CHECK_HEADERS(math.h,
- AC_CHECK_LIB(m,isinf,
- have_isinf=yes))
-
-if test "$have_isinf" = "no"; then
- AC_CHECK_HEADER(ieeefp.h,
- [AC_CHECK_FUNC(finite,
- AC_DEFINE(HAVE_IEEEFP_H,1,
- [Define if finite() is defined in ieeefp.h]),
- AC_MSG_ERROR([Can't find a definition of neither
- finite nor isinf]))],
- [AC_MSG_ERROR(Can't find neither a definition of
- isinf nor ieeefp.h)])
-else
- AC_DEFINE([HAVE_ISINF], 1,
- [Define if the isinf() function is available])
+dnl
+
+if test "$os_win32" = "no"; then
+
+ dnl Sun Forte C provides isinf() in the unbundled -lsunmath. Solaris
+ dnl declares finite() in ieeefp.h. It's preferrable not to link
+ dnl to -lsunmath as it's not present on all machines.
+ have_isinf=no
+ AC_CHECK_HEADERS(math.h,
+ AC_CHECK_LIB(m,isinf,
+ have_isinf=yes))
+
+ if test "$have_isinf" = "no"; then
+ AC_CHECK_HEADER(ieeefp.h,
+ [AC_CHECK_FUNC(finite,
+ AC_DEFINE(HAVE_IEEEFP_H,1,
+ [Define if finite() is defined in ieeefp.h]),
+ AC_MSG_ERROR([Can't find a definition of neither
+ finite nor isinf]))],
+ [AC_MSG_ERROR(Can't find neither a definition of
+ isinf nor ieeefp.h)])
+ else
+ AC_DEFINE([HAVE_ISINF], 1,
+ [Define if the isinf() function is available])
+ fi
+
fi
dnl Alpha needs -mieee or we get a segfault
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]