From bcd2b961ff2545f4daf8ca7150b660a23cb0c8f7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 4 Jun 1999 22:25:40 +0000 Subject: [PATCH] 1. warnings suppressed in wave.cpp 2. various fixes to configure/Makefiles - building in another dir works again 3. AC_C_BIGENDIAN replaced with WX_C_BIGENDIAN (much better :-) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- aclocal.m4 | 38 ++++++++++++++++++++++++++++++++++++ configure.in | 20 ++++++++++++------- include/wx/motif/Makefile.am | 1 - src/Makefile.am | 8 ++++++-- src/gtk/Makefile.am | 2 +- src/gtk/wave.cpp | 6 +++--- src/gtk1/Makefile.am | 2 +- src/gtk1/wave.cpp | 6 +++--- 8 files changed, 65 insertions(+), 18 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 5882f77a73..58b57dd2c6 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -930,3 +930,41 @@ AC_DEFUN(WX_CPP_SIZE_T_IS_NOT_INT, AC_LANG_RESTORE ]) ]) + +dnl --------------------------------------------------------------------------- +dnl a slightly better AC_C_BIGENDIAN macro which allows cross-compiling +dnl --------------------------------------------------------------------------- + +AC_DEFUN(WX_C_BIGENDIAN, +[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, +[ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +AC_TRY_COMPILE([#include +#include ], [ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif], [# It does; now see whether it defined to BIG_ENDIAN or not. +AC_TRY_COMPILE([#include +#include ], [ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) +if test $ac_cv_c_bigendian = unknown; then +AC_TRY_RUN([main () { + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes, ac_cv_c_bigendian=unknown) +fi]) +if test $ac_cv_c_bigendian = unknown; then + AC_MSG_WARN([Assuming little-endian target machine - this may be overriden by adding the line "ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}" to config.cache file]) +fi +if test $ac_cv_c_bigendian = yes; then + AC_DEFINE(WORDS_BIGENDIAN) +fi +]) diff --git a/configure.in b/configure.in index 2ebec37e9b..686e88fbf4 100644 --- a/configure.in +++ b/configure.in @@ -9,7 +9,7 @@ dnl dnl This script is under the wxWindows licence. dnl dnl Version: $Id$ -dnl //////////////////////////////////////////////////////////////////////// +dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- dnl initialization @@ -30,7 +30,7 @@ dnl never defined in configure.in (remove these lines to see what I'm dnl speaking about) - Tom Tromey told me that it will dnl be fixed in the next release. LIBOBJS= -dnl LIBOBJS="$LIBOBJS common/extended.o" +LIBOBJS="$LIBOBJS ../common/extended.o" dnl ------------------------------------------------------------------------ dnl Check platform (host system) @@ -149,6 +149,7 @@ if test "$USE_UNIX" = 1 ; then wxUSE_UNIX=yes AC_DEFINE(__UNIX__) EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../unix" + SRC_SUBDIRS="$SRC_SUBDIRS unix" INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix" fi @@ -1053,8 +1054,8 @@ AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(long long, 0) -dnl for bytesex stuff -AC_C_BIGENDIAN +dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling) +WX_C_BIGENDIAN dnl check for iostream (as opposed to iostream.h) standard header WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH)) @@ -1876,6 +1877,7 @@ AC_SUBST(EXTRA_VPATH) AC_SUBST(LTLIBOBJS) dnl additional subdirectories where we will build +AC_SUBST(SRC_SUBDIRS) AC_SUBST(INCLUDE_SUBDIRS) AC_SUBST(UTILS_SUBDIRS) AC_SUBST(DOCS_SUBDIRS) @@ -1903,9 +1905,13 @@ dnl (the original file name may be overriden by appending another name after a dnl colon) AC_OUTPUT([ wx-config - Makefile - src/Makefile - src/gtk/Makefile + Makefile + src/Makefile + src/common/Makefile + src/generic/Makefile + src/gtk/Makefile + src/motif/Makefile + src/unix/Makefile include/Makefile include/wx/Makefile include/wx/generic/Makefile diff --git a/include/wx/motif/Makefile.am b/include/wx/motif/Makefile.am index 2690c406e0..cbd7bdeda6 100644 --- a/include/wx/motif/Makefile.am +++ b/include/wx/motif/Makefile.am @@ -56,7 +56,6 @@ wx_motif_include_HEADERS = \ region.h \ scrolbar.h \ settings.h \ - setup0.h \ slider.h \ spinbutt.h \ statbmp.h \ diff --git a/src/Makefile.am b/src/Makefile.am index e103b4a1f3..d71a0c026c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,7 @@ -# replace with $(TOOLKIT_DIR) +## Purpose: The automake makefile for wxWindows (src direcotry) +## Author: Phil Blecker, Vadim Zeitlin +## Version: $Id$ +## +## Process this file with automake to produce Makefile.in -SUBDIRS = gtk +SUBDIRS = common generic ${SRC_SUBDIRS} ${TOOLKIT_DIR} diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am index 98d9f3263b..77496f9883 100644 --- a/src/gtk/Makefile.am +++ b/src/gtk/Makefile.am @@ -9,7 +9,7 @@ SUFFIXES = .cpp .c DEFS = $(TOOLKIT_DEF) $(WXDEBUG_DEFINE) LIBS = $(GUILIBS) -VPATH = .:${srcdir}/../common:${srcdir}/../generic:${EXTRA_VPATH} +VPATH = .:${srcdir}:${srcdir}/../common:${srcdir}/../generic:${EXTRA_VPATH} EXTRA_DIST = "${srcdir}/../common ${srcdir}/../generic ${srcdir}" diff --git a/src/gtk/wave.cpp b/src/gtk/wave.cpp index 0801a93663..ee85956bed 100644 --- a/src/gtk/wave.cpp +++ b/src/gtk/wave.cpp @@ -38,18 +38,18 @@ //----------------------------------------------------------------- wxWave::wxWave() - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) { } wxWave::wxWave(const wxString& sFileName, bool isResource) - : m_waveLength(0), m_isResource(isResource), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(isResource) { Create(sFileName, isResource); } wxWave::wxWave(int size, const wxByte* data) - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) { Create(size, data); } diff --git a/src/gtk1/Makefile.am b/src/gtk1/Makefile.am index 98d9f3263b..77496f9883 100644 --- a/src/gtk1/Makefile.am +++ b/src/gtk1/Makefile.am @@ -9,7 +9,7 @@ SUFFIXES = .cpp .c DEFS = $(TOOLKIT_DEF) $(WXDEBUG_DEFINE) LIBS = $(GUILIBS) -VPATH = .:${srcdir}/../common:${srcdir}/../generic:${EXTRA_VPATH} +VPATH = .:${srcdir}:${srcdir}/../common:${srcdir}/../generic:${EXTRA_VPATH} EXTRA_DIST = "${srcdir}/../common ${srcdir}/../generic ${srcdir}" diff --git a/src/gtk1/wave.cpp b/src/gtk1/wave.cpp index 0801a93663..ee85956bed 100644 --- a/src/gtk1/wave.cpp +++ b/src/gtk1/wave.cpp @@ -38,18 +38,18 @@ //----------------------------------------------------------------- wxWave::wxWave() - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) { } wxWave::wxWave(const wxString& sFileName, bool isResource) - : m_waveLength(0), m_isResource(isResource), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(isResource) { Create(sFileName, isResource); } wxWave::wxWave(int size, const wxByte* data) - : m_waveLength(0), m_isResource(FALSE), m_waveData(NULL) + : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) { Create(size, data); } -- 2.45.2