From de87c353122704df7dec7cde6e485a138129e20f Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 9 Oct 1999 11:20:06 +0000 Subject: [PATCH] Makefile changes for static libs and HP-UX, Compile fixes for HP-UX, git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- Makefile.in | 17 ++-- configure.in | 170 +++++++++++++++++++++------------------- distrib/msw/tmake/unx.t | 14 ++-- src/gtk/dcclient.cpp | 2 +- src/gtk1/dcclient.cpp | 2 +- src/html/m_image.cpp | 2 +- 6 files changed, 106 insertions(+), 101 deletions(-) diff --git a/Makefile.in b/Makefile.in index 582706dd8d..7c2cabbc9f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # -# This file was automatically generated by tmake at 18:19, 1999/10/06 +# This file was automatically generated by tmake at 11:14, 1999/10/09 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T! # @@ -201,7 +201,6 @@ WX_HEADERS = \ debug.h \ defs.h \ dialog.h \ - dialup.h \ dirdlg.h \ dnd.h \ docmdi.h \ @@ -1945,7 +1944,7 @@ DEPFILES = @ALL_DEPFILES@ HEADERS = @ALL_HEADERS@ -all: @WX_CREATE_LINKS@ +all: @WX_ALL@ @WX_LIBRARY_NAME_STATIC@: $(OBJECTS) @$(INSTALL) -d ./lib @@ -1956,7 +1955,7 @@ all: @WX_CREATE_LINKS@ @$(INSTALL) -d ./lib $(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS) -CREATE_LINKS: @WX_TARGET_LIBRARY@ +CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@ @$(RM) ./lib/@WX_LIBRARY_LINK1@ @$(RM) ./lib/@WX_LIBRARY_LINK2@ @$(RM) ./lib/@WX_LIBRARY_LINK3@ @@ -1964,13 +1963,13 @@ CREATE_LINKS: @WX_TARGET_LIBRARY@ $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK2@ $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK3@ -CREATE_INSTALLED_LINKS: $(libdir)/@WX_TARGET_LIBRARY@ +CREATE_INSTALLED_LINKS: $(libdir)/@WX_LIBRARY_NAME_SHARED@ $(RM) $(libdir)/@WX_LIBRARY_LINK1@ $(RM) $(libdir)/@WX_LIBRARY_LINK2@ $(RM) $(libdir)/@WX_LIBRARY_LINK3@ - $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK1@ - $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK2@ - $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK3@ + $(LN_S) @WX_LIBRARY_NAME_SHARED@ $(libdir)/@WX_LIBRARY_LINK1@ + $(LN_S) @WX_LIBRARY_NAME_SHARED@ $(libdir)/@WX_LIBRARY_LINK2@ + $(LN_S) @WX_LIBRARY_NAME_SHARED@ $(libdir)/@WX_LIBRARY_LINK3@ $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h @@ -2047,7 +2046,7 @@ write_message: @echo " Read the wxWindows Licence on licencing conditions." @echo " " -install: preinstall @WX_CREATE_INSTALLED_LINKS@ write_message +install: preinstall @WX_ALL_INSTALLED@ write_message uninstall: @echo " " diff --git a/configure.in b/configure.in index d09e34544e..5eb7e82736 100644 --- a/configure.in +++ b/configure.in @@ -1714,95 +1714,101 @@ WX_LIBRARY_LINK3="lib${WX_LIBRARY}.so" dnl shared library settings SHARED_LD= PIC_FLAG= -WX_CREATE_LINKS= +WX_ALL= +WX_ALL_INSTALLED= if test "$wxUSE_SHARED" = "yes"; then dnl set target to shared WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}" -case "${host}" in - *-hp-hpux* ) - WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl" - SHARED_LD="${CXX} -b -o" - PIC_FLAG="+Z" - ;; - *-*-linux* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-irix5* | *-*-irix6* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - else - SHARED_LD="${CXX} -shared -o" - fi - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-solaris2* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - else - SHARED_LD="${CXX} -G -o" - PIC_FLAG="PIC" - fi - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-sunos4* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-freebsd* | *-*-netbsd*) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-osf* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-dgux5* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-sysv5* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_CREATE_INSTALLED_LINKS="CREATE_INSTALLED_LINKS" - WX_CREATE_LINKS="CREATE_LINKS" - ;; - *-*-aix* ) - SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o" - ;; - *-*-cygwin32* ) - dnl only static for now - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - ;; - *-*-mingw32* ) - dnl only static for now - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - ;; - *-pc-os2_emx ) - ;; - *) - AC_MSG_ERROR(unknown system type ${host}.) -esac + case "${host}" in + *-hp-hpux* ) + WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl" + SHARED_LD="${CXX} -b -o" + PIC_FLAG="+Z" + WX_ALL=${WX_LIBRARY_NAME_SHARED} + ;; + *-*-linux* ) + SHARED_LD="${CC} -shared -o" + PIC_FLAG="-fPIC" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-irix5* | *-*-irix6* ) + if test "$GCC" = yes ; then + SHARED_LD="${CC} -shared -o" + PIC_FLAG="-fPIC" + else + SHARED_LD="${CXX} -shared -o" + fi + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-solaris2* ) + if test "$GCC" = yes ; then + SHARED_LD="${CC} -shared -o" + PIC_FLAG="-fPIC" + else + SHARED_LD="${CXX} -G -o" + PIC_FLAG="PIC" + fi + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-sunos4* ) + SHARED_LD="${CC} -shared -o" + PIC_FLAG="-fPIC" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-freebsd* | *-*-netbsd*) + SHARED_LD="${CC} -shared -o" + PIC_FLAG="-fPIC" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-osf* ) + SHARED_LD="${CXX} -shared -o" + PIC_FLAG="-fPIC" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-dgux5* ) + SHARED_LD="${CXX} -shared -o" + PIC_FLAG="-fPIC" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-sysv5* ) + SHARED_LD="${CC} -shared -o" + PIC_FLAG="-fPIC" + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + ;; + *-*-aix* ) + SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o" + WX_ALL=${WX_LIBRARY_NAME_SHARED} + ;; + *-*-cygwin32* ) + dnl only static for now + WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" + WX_ALL="${WX_LIBRARY_NAME_STATIC}" + ;; + *-*-mingw32* ) + dnl only static for now + WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" + WX_ALL="${WX_LIBRARY_NAME_STATIC}" + ;; + *-pc-os2_emx ) + ;; + *) + AC_MSG_ERROR(unknown system type ${host}.) + esac else dnl set target to static WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" + WX_ALL="${WX_LIBRARY_NAME_STATIC}" fi dnl ------------------------------------------------------------------------ @@ -2856,8 +2862,8 @@ AC_SUBST(WX_LIBRARY_LINK3) AC_SUBST(PROGRAM_EXT) dnl are we supposed to create the links? -AC_SUBST(WX_CREATE_LINKS) -AC_SUBST(WX_CREATE_INSTALLED_LINKS) +AC_SUBST(WX_ALL) +AC_SUBST(WX_ALL_INSTALLED) AC_SUBST(SHARED_LD) AC_SUBST(PIC_FLAG) diff --git a/distrib/msw/tmake/unx.t b/distrib/msw/tmake/unx.t index 7b09416e1f..0215c79554 100644 --- a/distrib/msw/tmake/unx.t +++ b/distrib/msw/tmake/unx.t @@ -503,7 +503,7 @@ DEPFILES = @ALL_DEPFILES@ HEADERS = @ALL_HEADERS@ -all: @WX_CREATE_LINKS@ +all: @WX_ALL@ @WX_LIBRARY_NAME_STATIC@: $(OBJECTS) @$(INSTALL) -d ./lib @@ -514,7 +514,7 @@ all: @WX_CREATE_LINKS@ @$(INSTALL) -d ./lib $(SHARED_LD) ./lib/$@ $(OBJECTS) $(EXTRALIBS) -CREATE_LINKS: @WX_TARGET_LIBRARY@ +CREATE_LINKS: @WX_LIBRARY_NAME_SHARED@ @$(RM) ./lib/@WX_LIBRARY_LINK1@ @$(RM) ./lib/@WX_LIBRARY_LINK2@ @$(RM) ./lib/@WX_LIBRARY_LINK3@ @@ -522,13 +522,13 @@ CREATE_LINKS: @WX_TARGET_LIBRARY@ $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK2@ $(LN_S) @WX_TARGET_LIBRARY@ ./lib/@WX_LIBRARY_LINK3@ -CREATE_INSTALLED_LINKS: $(libdir)/@WX_TARGET_LIBRARY@ +CREATE_INSTALLED_LINKS: $(libdir)/@WX_LIBRARY_NAME_SHARED@ $(RM) $(libdir)/@WX_LIBRARY_LINK1@ $(RM) $(libdir)/@WX_LIBRARY_LINK2@ $(RM) $(libdir)/@WX_LIBRARY_LINK3@ - $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK1@ - $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK2@ - $(LN_S) @WX_TARGET_LIBRARY@ $(libdir)/@WX_LIBRARY_LINK3@ + $(LN_S) @WX_LIBRARY_NAME_SHARED@ $(libdir)/@WX_LIBRARY_LINK1@ + $(LN_S) @WX_LIBRARY_NAME_SHARED@ $(libdir)/@WX_LIBRARY_LINK2@ + $(LN_S) @WX_LIBRARY_NAME_SHARED@ $(libdir)/@WX_LIBRARY_LINK3@ $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h @@ -605,7 +605,7 @@ write_message: @echo " Read the wxWindows Licence on licencing conditions." @echo " " -install: preinstall @WX_CREATE_INSTALLED_LINKS@ write_message +install: preinstall @WX_ALL_INSTALLED@ write_message uninstall: @echo " " diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index f17a53d55a..1c67530fae 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -211,7 +211,7 @@ void wxWindowDC::DoDrawArc( long x1, long y1, long x2, long y2, long yyc = YLOG2DEV(yc); double dx = xx1 - xxc; double dy = yy1 - yyc; - double radius = sqrt(dx*dx+dy*dy); + double radius = sqrt((double)(dx*dx+dy*dy)); long r = (long)radius; double radius1, radius2; diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index f17a53d55a..1c67530fae 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -211,7 +211,7 @@ void wxWindowDC::DoDrawArc( long x1, long y1, long x2, long y2, long yyc = YLOG2DEV(yc); double dx = xx1 - xxc; double dy = yy1 - yyc; - double radius = sqrt(dx*dx+dy*dy); + double radius = sqrt((double)(dx*dx+dy*dy)); long r = (long)radius; double radius1, radius2; diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index f6ca26be91..60bb5f5734 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -107,7 +107,7 @@ wxString wxHtmlImageMapAreaCell::GetLink( int x, int y ) const l = coords[ 0 ]; t = coords[ 1 ]; r = coords[ 2 ]; - d = sqrt( ((x - l) * (x - l)) + ((y - t) * (y - t)) ); + d = sqrt( (double) (((x - l) * (x - l)) + ((y - t) * (y - t))) ); if (d < (double)r) { return m_Link; -- 2.45.2