From 99b646189163a3d58dbed2da9559ea3abeebba44 Mon Sep 17 00:00:00 2001 From: Logue Date: Sun, 12 Feb 2012 17:21:56 +0900 Subject: [PATCH] =?utf8?q?=E3=82=A4=E3=83=8B=E3=82=B7=E3=83=A3=E3=83=AB?= =?utf8?q?=E3=82=B3=E3=83=9F=E3=83=83=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- AUTHORS | 0 Aorta File.icns | Bin 0 -> 41918 bytes Aorta-Info.plist | 86 ++ Aorta.icns | Bin 0 -> 43349 bytes Aorta.ico | Bin 0 -> 92854 bytes Aorta.xcodeproj/project.pbxproj | 359 +++++++ COPYING | 340 +++++++ ChangeLog | 0 DDSOptionsDialog.cpp | 185 ++++ DDSOptionsDialog.h | 77 ++ Filter.cpp | 337 +++++++ Filter.h | 145 +++ FloatImage.cpp | 828 ++++++++++++++++ FloatImage.h | 243 +++++ INSTALL | 370 +++++++ Makefile.am | 26 + Makefile.in | 682 +++++++++++++ NEWS | 0 README | 10 + VERSION | 1 + aclocal.m4 | 2033 +++++++++++++++++++++++++++++++++++++++ aorta.cpp | 824 ++++++++++++++++ aorta.h | 252 +++++ aorta.rc | 1 + autogen.sh | 61 ++ config.guess | 1522 +++++++++++++++++++++++++++++ config.h.in | 86 ++ config.status | 1236 ++++++++++++++++++++++++ config.sub | 1771 ++++++++++++++++++++++++++++++++++ configure.ac | 65 ++ depcomp | 688 +++++++++++++ imagdds.cpp | 533 ++++++++++ imagdds.h | 122 +++ image_ext.cpp | 332 +++++++ image_ext.h | 59 ++ install-sh | 527 ++++++++++ makedmg.sh | 13 + makezip.sh | 14 + missing | 376 ++++++++ stamp-h1 | 1 + 40 files changed, 14205 insertions(+) create mode 100644 AUTHORS create mode 100644 Aorta File.icns create mode 100644 Aorta-Info.plist create mode 100644 Aorta.icns create mode 100644 Aorta.ico create mode 100644 Aorta.xcodeproj/project.pbxproj create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 DDSOptionsDialog.cpp create mode 100644 DDSOptionsDialog.h create mode 100644 Filter.cpp create mode 100644 Filter.h create mode 100644 FloatImage.cpp create mode 100644 FloatImage.h create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 README create mode 100644 VERSION create mode 100644 aclocal.m4 create mode 100644 aorta.cpp create mode 100644 aorta.h create mode 100644 aorta.rc create mode 100644 autogen.sh create mode 100644 config.guess create mode 100644 config.h.in create mode 100644 config.status create mode 100644 config.sub create mode 100644 configure.ac create mode 100644 depcomp create mode 100644 imagdds.cpp create mode 100644 imagdds.h create mode 100644 image_ext.cpp create mode 100644 image_ext.h create mode 100644 install-sh create mode 100644 makedmg.sh create mode 100644 makezip.sh create mode 100644 missing create mode 100644 stamp-h1 diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/Aorta File.icns b/Aorta File.icns new file mode 100644 index 0000000000000000000000000000000000000000..19b54504ee253e76ef53f3f2df2b63fe3f8b2678 GIT binary patch literal 41918 zcmeHQ2V7Lg)}LL<(tER#1Wh9`Mx%)_CK_XmiKe|5lW0&Av7pf;>eFbV-n&ch2#Ad! zT@eAn21plBdT&eFrR~!DvP-+)nO#sonnqu~@Aq->vP?N;X3m|Nd;W7)lkNKtBIF%y zvi+a|Lg4Tq26%-YlmX?kn11hDJmBMFwY8wD{e{%Ms9}LK1(Xj5|pD2^`^b@B%&FL5L%gW|n=iwuf3 zcHuNKG&V3`uQez%>XM|9z_@Vl+O?1zOrtKLrI8`Db|{TojxTW<^LTif99+BzA-cT+ zLg`6~ao2o8Zr?RU^2Ka+L0X(&Y=s*ODX_~*ON%mMe0wWSF_B^gr=p^~IL)%Rx5A!8 zij`GWm0V8YMa$zZUXbMRf-i+~vwd7$f?Xlm;9ZrO5_l__d&fVRL{dEOszid4?vHG; zPK0F1weo0^k_u~b$bq`$!F{1o{Y_WWdYvmF+2RJq;PzJm#qn!^WOv>bigLV9b-M6d zASvuAa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#^|RVJD=vY<0qqU)-8W+&SVF0#qqbVEq#B@I{e-8 zPwRs3rC+z^{iUxxr>#73SfC{Sc+UJ+7reRn>0WOxcy<09Z523xJ%Rb*9q1FpUr!-W zd+wZBGjueR@%J;2xA~RiKT-Vo + + + + CFBundleDevelopmentRegion + English + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + dds + + CFBundleTypeIconFile + Aorta File.icns + CFBundleTypeName + DDS Image + CFBundleTypeRole + Editor + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + png + + CFBundleTypeIconFile + Aorta File.icns + CFBundleTypeName + PNG Image + CFBundleTypeRole + Editor + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + jpg + jpeg + + CFBundleTypeName + JPEG Image + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + bmp + + CFBundleTypeName + BMP Image + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + Aorta + CFBundleIdentifier + com.alephone.Aorta + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + AORT + CFBundleShortVersionString + 2.1 + + diff --git a/Aorta.icns b/Aorta.icns new file mode 100644 index 0000000000000000000000000000000000000000..87d1bd314182a363066db8c2117ee321d27f0d04 GIT binary patch literal 43349 zcmeEv1zc21-~Vj0!7jBl(kdthSXf|U2UysFf!KO&z1eaeH zr<|;ntcBmdcL)vK>fGeq^fes&tQvG{IN7uqgg{OYkmLC^zWMF+kjT3JH%L;iUwm{F zove#LpOCH42Z0(ShFG96n7GAdWwpHh&C_wMg*oKI zmK})B(^Qfmx{@Z>1@R}O);x4;r|dhzuDYq{ogI+hJrZ&7jMCR&2DUy%RNlEVc zSaLq1`H+{Q!E@^p>5Az4$xII^$@9!4chV4KN07IKc znmc0ASadpz_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G&?MgTc11wQs+k_m~G*AN0eV%9S5nQK-;q?FtvJ)*&hBkx!d6`H+4}Cigep z``b*Xl#APr41QUpDKQ;iD8t_NVO<*jRfc|@(h8r;#UuH!%YWQ^V=`vsB=aO*b?N76 naXCX%qYhL}3GOMG5=@Pv-waZMexwBTmm0NT#DWoMG5Y@iX9)Xs literal 0 HcmV?d00001 diff --git a/Aorta.xcodeproj/project.pbxproj b/Aorta.xcodeproj/project.pbxproj new file mode 100644 index 0000000..bffc979 --- /dev/null +++ b/Aorta.xcodeproj/project.pbxproj @@ -0,0 +1,359 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + AE0D48060AD8761E00FD3D5E /* DDSOptionsDialog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE0D48040AD8761E00FD3D5E /* DDSOptionsDialog.cpp */; }; + AE196BC70D82FF6A004326F1 /* Filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE196BC50D82FF6A004326F1 /* Filter.cpp */; }; + AE196BC80D82FF6A004326F1 /* FloatImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AE196BC60D82FF6A004326F1 /* FloatImage.cpp */; }; + AE47D04B0D8338F800CA41ED /* Squish.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = AEFCB5B00AC77A520004082D /* Squish.framework */; }; + AE95AF910A16A4ED00E758BE /* Aorta-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AED0D8D20A101D4800C61B65 /* Aorta-Info.plist */; }; + AEA152AC0AC9DFEB00E8890F /* Aorta File.icns in Resources */ = {isa = PBXBuildFile; fileRef = AEA152AB0AC9DFEB00E8890F /* Aorta File.icns */; }; + AEBF58250A1025ED00C810B8 /* Aorta.icns in Resources */ = {isa = PBXBuildFile; fileRef = AEBF58240A1025ED00C810B8 /* Aorta.icns */; }; + AEBF5BAA0A1642D200C810B8 /* image_ext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEBF5BA90A1642D200C810B8 /* image_ext.cpp */; }; + AED0D9110A10256500C61B65 /* aorta.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AED0D9100A10256500C61B65 /* aorta.cpp */; }; + AEFCB5B10AC77A520004082D /* Squish.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEFCB5B00AC77A520004082D /* Squish.framework */; }; + AEFE011A0A1979B700E99D09 /* imagdds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEFE01180A1979B700E99D09 /* imagdds.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + AE47D0490D8338D500CA41ED /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + AE47D04B0D8338F800CA41ED /* Squish.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + AE0D48040AD8761E00FD3D5E /* DDSOptionsDialog.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DDSOptionsDialog.cpp; sourceTree = ""; }; + AE0D48050AD8761E00FD3D5E /* DDSOptionsDialog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DDSOptionsDialog.h; sourceTree = ""; }; + AE196BC50D82FF6A004326F1 /* Filter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Filter.cpp; sourceTree = ""; }; + AE196BC60D82FF6A004326F1 /* FloatImage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatImage.cpp; sourceTree = ""; }; + AE196BC90D82FF7B004326F1 /* Filter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Filter.h; sourceTree = ""; }; + AE196BCA0D82FF7B004326F1 /* FloatImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatImage.h; sourceTree = ""; }; + AEA152AB0AC9DFEB00E8890F /* Aorta File.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "Aorta File.icns"; sourceTree = ""; }; + AEBF58240A1025ED00C810B8 /* Aorta.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Aorta.icns; sourceTree = ""; }; + AEBF5B6B0A163E6300C810B8 /* image_ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = image_ext.h; sourceTree = ""; }; + AEBF5BA90A1642D200C810B8 /* image_ext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = image_ext.cpp; sourceTree = ""; }; + AED0D8D00A101D4800C61B65 /* Aorta.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Aorta.app; sourceTree = BUILT_PRODUCTS_DIR; }; + AED0D8D20A101D4800C61B65 /* Aorta-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Aorta-Info.plist"; sourceTree = ""; }; + AED0D9090A10251B00C61B65 /* aorta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aorta.h; sourceTree = ""; }; + AED0D9100A10256500C61B65 /* aorta.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = aorta.cpp; sourceTree = ""; }; + AEFCB5B00AC77A520004082D /* Squish.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Squish.framework; path = /Library/Frameworks/Squish.framework; sourceTree = ""; }; + AEFE01180A1979B700E99D09 /* imagdds.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = imagdds.cpp; sourceTree = ""; }; + AEFE01190A1979B700E99D09 /* imagdds.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = imagdds.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + AED0D8CE0A101D4800C61B65 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + AEFCB5B10AC77A520004082D /* Squish.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + AE95AFE90A16A6EC00E758BE /* Resources */ = { + isa = PBXGroup; + children = ( + AEA152AB0AC9DFEB00E8890F /* Aorta File.icns */, + AEFCB5B00AC77A520004082D /* Squish.framework */, + AEBF58240A1025ED00C810B8 /* Aorta.icns */, + AED0D8D20A101D4800C61B65 /* Aorta-Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + AED0D8B30A101C1500C61B65 = { + isa = PBXGroup; + children = ( + AE196BC90D82FF7B004326F1 /* Filter.h */, + AE196BCA0D82FF7B004326F1 /* FloatImage.h */, + AE196BC50D82FF6A004326F1 /* Filter.cpp */, + AE196BC60D82FF6A004326F1 /* FloatImage.cpp */, + AE0D48040AD8761E00FD3D5E /* DDSOptionsDialog.cpp */, + AE0D48050AD8761E00FD3D5E /* DDSOptionsDialog.h */, + AEFE01180A1979B700E99D09 /* imagdds.cpp */, + AEFE01190A1979B700E99D09 /* imagdds.h */, + AED0D9090A10251B00C61B65 /* aorta.h */, + AED0D9100A10256500C61B65 /* aorta.cpp */, + AEBF5B6B0A163E6300C810B8 /* image_ext.h */, + AEBF5BA90A1642D200C810B8 /* image_ext.cpp */, + AE95AFE90A16A6EC00E758BE /* Resources */, + AED0D8C70A101CBD00C61B65 /* Products */, + ); + sourceTree = ""; + }; + AED0D8C70A101CBD00C61B65 /* Products */ = { + isa = PBXGroup; + children = ( + AED0D8D00A101D4800C61B65 /* Aorta.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + AED0D8CF0A101D4800C61B65 /* Aorta */ = { + isa = PBXNativeTarget; + buildConfigurationList = AED0D8D30A101D4800C61B65 /* Build configuration list for PBXNativeTarget "Aorta" */; + buildPhases = ( + AED0D8CC0A101D4800C61B65 /* Resources */, + AED0D8CD0A101D4800C61B65 /* Sources */, + AED0D8CE0A101D4800C61B65 /* Frameworks */, + AE47D0490D8338D500CA41ED /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Aorta; + productName = Aorta; + productReference = AED0D8D00A101D4800C61B65 /* Aorta.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + AED0D8B50A101C1500C61B65 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = AED0D8B60A101C1500C61B65 /* Build configuration list for PBXProject "Aorta" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 0; + mainGroup = AED0D8B30A101C1500C61B65; + productRefGroup = AED0D8C70A101CBD00C61B65 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + AED0D8CF0A101D4800C61B65 /* Aorta */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + AED0D8CC0A101D4800C61B65 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AEBF58250A1025ED00C810B8 /* Aorta.icns in Resources */, + AE95AF910A16A4ED00E758BE /* Aorta-Info.plist in Resources */, + AEA152AC0AC9DFEB00E8890F /* Aorta File.icns in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + AED0D8CD0A101D4800C61B65 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AED0D9110A10256500C61B65 /* aorta.cpp in Sources */, + AEBF5BAA0A1642D200C810B8 /* image_ext.cpp in Sources */, + AEFE011A0A1979B700E99D09 /* imagdds.cpp in Sources */, + AE0D48060AD8761E00FD3D5E /* DDSOptionsDialog.cpp in Sources */, + AE196BC70D82FF6A004326F1 /* Filter.cpp in Sources */, + AE196BC80D82FF6A004326F1 /* FloatImage.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + AED0D8B70A101C1500C61B65 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Debug; + }; + AED0D8B80A101C1500C61B65 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Release; + }; + AED0D8D40A101D4800C61B65 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + i386, + ppc, + ); + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + GCC_VERSION = 4.0; + INFOPLIST_FILE = "Aorta-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_CFLAGS = ( + "-I/usr/local/lib/wx/include/mac-unicode-release-static-2.8", + "-I/usr/local/include/wx-2.8", + "-D_FILE_OFFSET_BITS=64", + "-D_LARGE_FILES", + "-D__WXMAC__", + "-I/Library/Frameworks/squish.framework/Headers", + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-framework", + IOKit, + "-framework", + Carbon, + "-framework", + Cocoa, + "-framework", + System, + "-framework", + QuickTime, + "-framework", + OpenGL, + "-framework", + AGL, + "/usr/local/lib/libwx_macu_richtext-2.8.a", + "/usr/local/lib/libwx_macu_aui-2.8.a", + "/usr/local/lib/libwx_macu_xrc-2.8.a", + "/usr/local/lib/libwx_macu_qa-2.8.a", + "/usr/local/lib/libwx_macu_html-2.8.a", + "/usr/local/lib/libwx_macu_adv-2.8.a", + "/usr/local/lib/libwx_macu_core-2.8.a", + "/usr/local/lib/libwx_base_carbonu_xml-2.8.a", + "/usr/local/lib/libwx_base_carbonu_net-2.8.a", + "/usr/local/lib/libwx_base_carbonu-2.8.a", + "-framework", + WebKit, + "-lwxregexu-2.8", + "-lwxexpat-2.8", + "-lwxtiff-2.8", + "-lwxjpeg-2.8", + "-lwxpng-2.8", + "-lz", + "-lpthread", + "-liconv", + ); + PREBINDING = NO; + PRODUCT_NAME = Aorta; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Debug; + }; + AED0D8D50A101D4800C61B65 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = YES; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 2; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; + GCC_VERSION = 4.0; + INFOPLIST_FILE = "Aorta-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_CFLAGS = ( + "-I/usr/local/lib/wx/include/mac-unicode-release-static-2.8", + "-I/usr/local/include/wx-2.8", + "-D_FILE_OFFSET_BITS=64", + "-D_LARGE_FILES", + "-D__WXMAC__", + "-I/Library/Frameworks/squish.framework/Headers", + ); + OTHER_LDFLAGS = ( + "-L/usr/local/lib", + "-framework", + IOKit, + "-framework", + Carbon, + "-framework", + Cocoa, + "-framework", + System, + "-framework", + QuickTime, + "-framework", + OpenGL, + "-framework", + AGL, + "/usr/local/lib/libwx_macu_richtext-2.8.a", + "/usr/local/lib/libwx_macu_aui-2.8.a", + "/usr/local/lib/libwx_macu_xrc-2.8.a", + "/usr/local/lib/libwx_macu_qa-2.8.a", + "/usr/local/lib/libwx_macu_html-2.8.a", + "/usr/local/lib/libwx_macu_adv-2.8.a", + "/usr/local/lib/libwx_macu_core-2.8.a", + "/usr/local/lib/libwx_base_carbonu_xml-2.8.a", + "/usr/local/lib/libwx_base_carbonu_net-2.8.a", + "/usr/local/lib/libwx_base_carbonu-2.8.a", + "-framework", + WebKit, + "-lwxregexu-2.8", + "-lwxexpat-2.8", + "-lwxtiff-2.8", + "-lwxjpeg-2.8", + "-lwxpng-2.8", + "-lz", + "-lpthread", + "-liconv", + ); + PREBINDING = NO; + PRODUCT_NAME = Aorta; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + STRIP_STYLE = debugging; + WRAPPER_EXTENSION = app; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + AED0D8B60A101C1500C61B65 /* Build configuration list for PBXProject "Aorta" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AED0D8B70A101C1500C61B65 /* Debug */, + AED0D8B80A101C1500C61B65 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + AED0D8D30A101D4800C61B65 /* Build configuration list for PBXNativeTarget "Aorta" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AED0D8D40A101D4800C61B65 /* Debug */, + AED0D8D50A101D4800C61B65 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = AED0D8B50A101C1500C61B65 /* Project object */; +} diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/DDSOptionsDialog.cpp b/DDSOptionsDialog.cpp new file mode 100644 index 0000000..e546e0a --- /dev/null +++ b/DDSOptionsDialog.cpp @@ -0,0 +1,185 @@ +/* + + DDSOptionsDialog.cpp: part of the Aleph One Replacement Texture Utility + Copyright (C) 2006 Gregory Smith + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +*/ + +#include "DDSOptionsDialog.h" + +DDSOptionsDialog::DDSOptionsDialog(const wxString& prefix, bool HasAlpha) + : wxDialog(NULL, -1, wxT("DDS Options"), wxDefaultPosition, wxDefaultSize), m_prefix(prefix), m_hasAlpha(HasAlpha) +{ + + mipmapBox_staticbox = new wxStaticBox(this, -1, wxT("Mipmap Halo Removal")); + useDXTC = new wxCheckBox(this, -1, wxT("Use DXTC (Texture Compression)")); + generateMipmaps = new wxCheckBox(this, BUTTON_GenerateMipmaps, wxT("Generate Mipmaps")); + wxArrayString filterChoices; + filterChoices.Add(wxT("Box")); + filterChoices.Add(wxT("Triangle")); + filterChoices.Add(wxT("Kaiser")); + mipmapFilterChoice = new wxChoice(this, -1, wxDefaultPosition, wxDefaultSize, filterChoices); + + repeatingTexture = new wxCheckBox(this, -1, wxT("Image Repeats")); + + colorFillBackground = new wxCheckBox(this, BUTTON_ColorFillBackground, wxT("Fast Halo Removal")); + reconstructColors = new wxCheckBox(this, BUTTON_ReconstructColors, wxT("Reconstruct Edge Colors")); + chooseBackground = new wxButton(this, BUTTON_ChooseBackground, wxT("Choose Background Color...")); + + fill_from_prefs(); + update_enablement(); + do_layout(); +} + +void DDSOptionsDialog::fill_from_prefs() +{ + wxConfig config; + config.SetPath(m_prefix); + + bool value; + config.Read(wxT("UseDXTC"), &value, true); + useDXTC->SetValue(value ? 1 : 0); + + config.Read(wxT("GenerateMipmaps"), &value, true); + generateMipmaps->SetValue(value ? 1 : 0); + + long filter; + config.Read(wxT("MipmapFilter"), &filter, 1); + mipmapFilterChoice->SetSelection(filter); + + config.Read(wxT("WrapMode"), &filter, 1); + repeatingTexture->SetValue((filter == 1) ? 1 : 0); + + wxString haloRemovalStrategy; + config.Read(wxT("FastHaloRemoval"), &value, true); + colorFillBackground->SetValue(value ? 1 : 0); + + config.Read(wxT("ReconstructEdgeColors"), &value, true); + reconstructColors->SetValue(value ? 1 : 0); + + long r, g, b; + config.Read(wxT("BackgroundColor/R"), &r, 0xff); + config.Read(wxT("BackgroundColor/G"), &g, 0xff); + config.Read(wxT("BackgroundColor/B"), &b, 0xff); + backgroundColor.Set((unsigned char) r, (unsigned char) g, (unsigned char) b); +} + +void DDSOptionsDialog::update_enablement() +{ + repeatingTexture->Enable(generateMipmaps->GetValue()); + mipmapFilterChoice->Enable(generateMipmaps->GetValue()); + colorFillBackground->Enable(generateMipmaps->GetValue() && m_hasAlpha); + reconstructColors->Enable(generateMipmaps->GetValue() && m_hasAlpha && colorFillBackground->GetValue()); + chooseBackground->Enable(generateMipmaps->GetValue() && m_hasAlpha && colorFillBackground->GetValue() && reconstructColors->GetValue()); +} + +bool DDSOptionsDialog::Validate() +{ + wxConfig config; + config.SetPath(m_prefix); + config.Write(wxT("UseDXTC"), useDXTC->GetValue()); + config.Write(wxT("GenerateMipmaps"), generateMipmaps->GetValue()); + if (generateMipmaps->GetValue()) + { + config.Write(wxT("MipmapFilter"), mipmapFilterChoice->GetSelection()); + config.Write(wxT("WrapMode"), repeatingTexture->GetValue() ? 1 : 0); + if (colorFillBackground->GetValue()) + { + config.Write(wxT("FastHaloRemoval"), true); + config.Write(wxT("ReconstructEdgeColors"), reconstructColors->GetValue() == 1); + + config.Write(wxT("BackgroundColor/R"), (long) backgroundColor.Red()); + config.Write(wxT("BackgroundColor/G"), (long) backgroundColor.Green()); + config.Write(wxT("BackgroundColor/B"), (long) backgroundColor.Blue()); + } + else + { + config.Write(wxT("FastHaloRemoval"), false); + } + } + + return TRUE; +} + +void DDSOptionsDialog::do_layout() +{ + // begin wxGlade: MyFrame::do_layout + wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer* mipmapIndenter = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* mipmapSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer* mipmapFilterSizer = new wxBoxSizer(wxHORIZONTAL); + wxStaticBoxSizer* mipmapBox = new wxStaticBoxSizer(mipmapBox_staticbox, wxVERTICAL); + wxBoxSizer* colorFillIndenter = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer* colorFillBox = new wxBoxSizer(wxVERTICAL); + wxBoxSizer* chooseBackgroundIndenter = new wxBoxSizer(wxHORIZONTAL); + mipmapFilterSizer->Add(new wxStaticText(this, -1, wxT("Filter:")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10); + mipmapFilterSizer->Add(mipmapFilterChoice, 1, wxALIGN_CENTER_VERTICAL | wxEXPAND); + topSizer->Add(useDXTC, 0, wxALL |wxADJUST_MINSIZE, 10); + topSizer->Add(generateMipmaps, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 10); + mipmapSizer->Add(repeatingTexture, 0, wxRIGHT|wxLEFT|wxBOTTOM | wxADJUST_MINSIZE|wxEXPAND, 10); + mipmapSizer->Add(mipmapFilterSizer, 0, wxRIGHT|wxLEFT|wxBOTTOM| wxADJUST_MINSIZE | wxEXPAND, 10); + mipmapIndenter->Add(20, 20, 0, wxADJUST_MINSIZE, 1); + mipmapBox->Add(colorFillBackground, 0, wxALL|wxADJUST_MINSIZE, 10); + colorFillIndenter->Add(20, 20, 0, wxADJUST_MINSIZE, 0); + colorFillBox->Add(reconstructColors, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 10); + chooseBackgroundIndenter->Add(20, 20, 0, wxADJUST_MINSIZE, 0); + chooseBackgroundIndenter->Add(chooseBackground, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 10); + colorFillBox->Add(chooseBackgroundIndenter, 1, wxEXPAND, 0); + colorFillIndenter->Add(colorFillBox, 1, wxEXPAND, 0); + mipmapBox->Add(colorFillIndenter, 1, wxEXPAND, 0); + mipmapSizer->Add(mipmapBox, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 10); + mipmapIndenter->Add(mipmapSizer, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 10); + topSizer->Add(mipmapIndenter, 1, wxEXPAND, 0); + wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL); + wxButton *cancelButton = new wxButton(this, wxID_CANCEL); + buttonSizer->Add(cancelButton, 1, wxLEFT|wxRIGHT, 10); + wxButton *okButton = new wxButton(this, wxID_OK); + buttonSizer->Add(okButton, 1, wxLEFT|wxRIGHT, 10); + topSizer->Add(buttonSizer, 0, wxEXPAND|wxBOTTOM, 10); + SetAutoLayout(true); + SetSizer(topSizer); + topSizer->Fit(this); + topSizer->SetSizeHints(this); + Layout(); +} + +void DDSOptionsDialog::OnChooseBackground(wxCommandEvent &) +{ + wxColourData data; + data.SetColour(backgroundColor); + wxColourDialog dialog(this, &data); + if (dialog.ShowModal() == wxID_OK) + { + wxColourData redData = dialog.GetColourData(); + backgroundColor = redData.GetColour(); + } +} + +void DDSOptionsDialog::OnUpdateEnablement(wxCommandEvent &) +{ + update_enablement(); +} + +BEGIN_EVENT_TABLE(DDSOptionsDialog, wxDialog) +EVT_BUTTON(BUTTON_ChooseBackground, DDSOptionsDialog::OnChooseBackground) +EVT_CHECKBOX(BUTTON_ColorFillBackground, DDSOptionsDialog::OnUpdateEnablement) +EVT_CHECKBOX(BUTTON_ReconstructColors, DDSOptionsDialog::OnUpdateEnablement) +EVT_CHECKBOX(BUTTON_GenerateMipmaps, DDSOptionsDialog::OnUpdateEnablement) + +END_EVENT_TABLE() + + diff --git a/DDSOptionsDialog.h b/DDSOptionsDialog.h new file mode 100644 index 0000000..90d78f2 --- /dev/null +++ b/DDSOptionsDialog.h @@ -0,0 +1,77 @@ +/* + + DDSOptionsDialog.h: part of the Aleph One Replacement Texture Utility + Copyright (C) 2006 Gregory Smith + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + */ + +#ifndef DDSOPTIONSDIALOG_H +#define DDSOPTIONSDIALOG_H + +#include +#ifndef WX_PRECOMP +#include +#include +#include +#include +#include +#ifdef wxUSE_DRAG_AND_DROP +#include +#endif +#include +#include +#include +#include +#include +#include + +#include +#include +#endif + +#include "aorta.h" + +class DDSOptionsDialog : public wxDialog +{ +public: + DDSOptionsDialog(const wxString& preferencesPrefix, bool HasAlpha); + + wxStaticBox* mipmapBox_staticbox; + wxCheckBox* useDXTC; + wxCheckBox* generateMipmaps; + wxChoice* mipmapFilterChoice; + wxCheckBox* repeatingTexture; + wxCheckBox* colorFillBackground; + wxCheckBox* reconstructColors; + wxButton* chooseBackground; + + wxColor backgroundColor; + + void OnChooseBackground(wxCommandEvent &); + void OnUpdateEnablement(wxCommandEvent &); +private: + wxString m_prefix; + bool m_hasAlpha; + void fill_from_prefs(); + void do_layout(); + void update_enablement(); + bool Validate(); + + DECLARE_EVENT_TABLE() +}; + +#endif diff --git a/Filter.cpp b/Filter.cpp new file mode 100644 index 0000000..2472d0d --- /dev/null +++ b/Filter.cpp @@ -0,0 +1,337 @@ +// This code is in the public domain -- castanyo@yahoo.es + +/** @file Filter.cpp + * @brief Image filters. + * + * Jonathan Blow articles: + * http://number-none.com/product/Mipmapping, Part 1/index.html + * http://number-none.com/product/Mipmapping, Part 2/index.html + * + * References from Thacher Ulrich: + * See _Graphics Gems III_ "General Filtered Image Rescaling", Dale A. Schumacher + * http://tog.acm.org/GraphicsGems/gemsiii/filter.c + * + * References from Paul Heckbert: + * A.V. Oppenheim, R.W. Schafer, Digital Signal Processing, Prentice-Hall, 1975 + * + * R.W. Hamming, Digital Filters, Prentice-Hall, Englewood Cliffs, NJ, 1983 + * + * W.K. Pratt, Digital Image Processing, John Wiley and Sons, 1978 + * + * H.S. Hou, H.C. Andrews, "Cubic Splines for Image Interpolation and + * Digital Filtering", IEEE Trans. Acoustics, Speech, and Signal Proc., + * vol. ASSP-26, no. 6, Dec. 1978, pp. 508-517 + * + * Paul Heckbert's zoom library. + * http://www.xmission.com/~legalize/zoom.html + * + * Reconstruction Filters in Computer Graphics + * http://www.mentallandscape.com/Papers_siggraph88.pdf + * + * More references: + * http://www.worldserver.com/turk/computergraphics/ResamplingFilters.pdf + * http://www.dspguide.com/ch16.htm + */ + + +#include +#include +#include +#include "Filter.h" + +#ifndef PI +#define PI float(3.1415926535897932384626433833) +#endif + +// Sinc function. +inline static float sincf(const float x) +{ + if (fabs(x) < 0.0001f) { + //return 1.0; + return 1.0f + x*x*(-1.0f/6.0f + x*x*1.0f/120.0f); + } + else { + return sin(x) / x; + } +} + +// Bessel function of the first kind from Jon Blow's article. +// http://mathworld.wolfram.com/BesselFunctionoftheFirstKind.html +// http://en.wikipedia.org/wiki/Bessel_function +inline static float bessel0(float x) +{ + const float EPSILON_RATIO = 1e-6f; + float xh, sum, pow, ds; + int k; + + xh = 0.5f * x; + sum = 1.0f; + pow = 1.0f; + k = 0; + ds = 1.0; + while (ds > sum * EPSILON_RATIO) { + ++k; + pow = pow * (xh / k); + ds = pow * pow; + sum = sum + ds; + } + + return sum; +} + +/*// Alternative bessel function from Paul Heckbert. + static float _bessel0(float x) + { + const float EPSILON_RATIO = 1E-6; + float sum = 1.0f; + float y = x * x / 4.0f; + float t = y; + for(int i = 2; t > EPSILON_RATIO; i++) { + sum += t; + t *= y / float(i * i); + } + return sum; + }*/ + +Filter::Filter(float width) : m_width(width) +{ +} + +/*virtual*/ Filter::~Filter() +{ +} + +float Filter::sampleDelta(float x, float scale) const +{ + return evaluate((x + 0.5f)* scale); +} + +float Filter::sampleBox(float x, float scale, int samples) const +{ + float sum = 0; + float isamples = 1.0f / float(samples); + + for(int s = 0; s < samples; s++) + { + float p = (x + (float(s) + 0.5f) * isamples) * scale; + float value = evaluate(p); + sum += value; + } + + return sum * isamples; +} + +float Filter::sampleTriangle(float x, float scale, int samples) const +{ + float sum = 0; + float isamples = 1.0f / float(samples); + + for(int s = 0; s < samples; s++) + { + float offset = (2 * float(s) + 1.0f) * isamples; + float p = (x + offset - 0.5f) * scale; + float value = evaluate(p); + + float weight = offset; + if (weight > 1.0f) weight = 2.0f - weight; + + sum += value * weight; + } + + return 2 * sum * isamples; +} + + + + + +BoxFilter::BoxFilter() : Filter(0.5f) {} +BoxFilter::BoxFilter(float width) : Filter(width) {} + +float BoxFilter::evaluate(float x) const +{ + if (fabs(x) <= m_width) return 1.0f; + else return 0.0f; +} + + +TriangleFilter::TriangleFilter() : Filter(1.0f) {} +TriangleFilter::TriangleFilter(float width) : Filter(width) {} + +float TriangleFilter::evaluate(float x) const +{ + x = fabs(x); + if( x < m_width ) return m_width - x; + return 0.0f; +} + + +KaiserFilter::KaiserFilter(float w) : Filter(w) { setParameters(4.0f, 1.0f); } + +float KaiserFilter::evaluate(float x) const +{ + const float sinc_value = sincf(PI * x * stretch); + const float t = x / m_width; + if ((1 - t * t) >= 0) return sinc_value * bessel0(alpha * sqrtf(1 - t * t)) / bessel0(alpha); + else return 0; +} + +void KaiserFilter::setParameters(float alpha, float stretch) +{ + this->alpha = alpha; + this->stretch = stretch; +} + + + +/// Ctor. +Kernel1::Kernel1(const Filter & f, int iscale, int samples/*= 32*/) +{ +// nvDebugCheck(iscale > 1); +// nvDebugCheck(samples > 0); + + const float scale = 1.0f / iscale; + + m_width = f.width() * iscale; + m_windowSize = (int)ceilf(2 * m_width); + m_data = new float[m_windowSize]; + + const float offset = float(m_windowSize) / 2; + + float total = 0.0f; + for (int i = 0; i < m_windowSize; i++) + { + const float sample = f.sampleBox(i - offset, scale, samples); + m_data[i] = sample; + total += sample; + } + + const float inv = 1.0f / total; + for (int i = 0; i < m_windowSize; i++) + { + m_data[i] *= inv; + } +} + +/// Dtor. +Kernel1::~Kernel1() +{ + delete m_data; +} + +/// Print the kernel for debugging purposes. +void Kernel1::debugPrint() +{ + for (int i = 0; i < m_windowSize; i++) { +// nvDebug("%d: %f\n", i, m_data[i]); + } +} + + + +/// Ctor. +Kernel2::Kernel2(uint ws) : m_windowSize(ws) +{ + m_data = new float[m_windowSize * m_windowSize]; +} + +/// Copy ctor. +Kernel2::Kernel2(const Kernel2 & k) : m_windowSize(k.m_windowSize) +{ + m_data = new float[m_windowSize * m_windowSize]; + for (uint i = 0; i < m_windowSize * m_windowSize; i++) { + m_data[i] = k.m_data[i]; + } +} + + +/// Dtor. +Kernel2::~Kernel2() +{ + delete m_data; +} + +/// Normalize the filter. +void Kernel2::normalize() +{ + float total = 0.0f; + for(uint i = 0; i < m_windowSize*m_windowSize; i++) { + total += fabs(m_data[i]); + } + + float inv = 1.0f / total; + for(uint i = 0; i < m_windowSize*m_windowSize; i++) { + m_data[i] *= inv; + } +} + +/// Transpose the kernel. +void Kernel2::transpose() +{ + for(uint i = 0; i < m_windowSize; i++) { + for(uint j = i+1; j < m_windowSize; j++) { + std::swap(m_data[i*m_windowSize + j], m_data[j*m_windowSize + i]); + } + } +} + +PolyphaseKernel::PolyphaseKernel(const Filter & f, uint srcLength, uint dstLength, int samples/*= 32*/) +{ +// nvCheck(srcLength >= dstLength); // @@ Upsampling not implemented! +// nvDebugCheck(samples > 0); + + const float scale = float(dstLength) / float(srcLength); + const float iscale = 1.0f / scale; + + m_length = dstLength; + m_width = f.width() * iscale; + m_windowSize = (int)ceilf(m_width * 2) + 1; + + m_data = new float[m_windowSize * m_length]; + memset(m_data, 0, sizeof(float) * m_windowSize * m_length); + + for (uint i = 0; i < m_length; i++) + { + const float center = (0.5f + i) * iscale; + + const int left = (int)floorf(center - m_width); + const int right = (int)ceilf(center + m_width); +// nvDebugCheck(right - left <= m_windowSize); + + float total = 0.0f; + for (int j = 0; j < m_windowSize; j++) + { + const float sample = f.sampleBox(left + j - center, scale, samples); + + m_data[i * m_windowSize + j] = sample; + total += sample; + } + + // normalize weights. + for (int j = 0; j < m_windowSize; j++) + { + m_data[i * m_windowSize + j] /= total; + } + } +} + +PolyphaseKernel::~PolyphaseKernel() +{ + delete [] m_data; +} + + +/// Print the kernel for debugging purposes. +void PolyphaseKernel::debugPrint() const +{ + for (uint i = 0; i < m_length; i++) + { +// nvDebug("%d: ", i); + for (int j = 0; j < m_windowSize; j++) + { +// nvDebug(" %6.4f", m_data[i * m_windowSize + j]); + } +// nvDebug("\n"); + } +} + diff --git a/Filter.h b/Filter.h new file mode 100644 index 0000000..ce59968 --- /dev/null +++ b/Filter.h @@ -0,0 +1,145 @@ +// This code is in the public domain -- castanyo@yahoo.es + +#ifndef NV_IMAGE_FILTER_H +#define NV_IMAGE_FILTER_H + +#define uint unsigned int + +/// Base filter class. +class Filter +{ +public: + Filter(float width); + virtual ~Filter(); + + float width() const { return m_width; } + float sampleDelta(float x, float scale) const; + float sampleBox(float x, float scale, int samples) const; + float sampleTriangle(float x, float scale, int samples) const; + + virtual float evaluate(float x) const = 0; + +protected: + const float m_width; +}; + +// Box filter. +class BoxFilter : public Filter +{ +public: + BoxFilter(); + BoxFilter(float width); + virtual float evaluate(float x) const; +}; + +// Triangle (bilinear/tent) filter. +class TriangleFilter : public Filter +{ +public: + TriangleFilter(); + TriangleFilter(float width); + virtual float evaluate(float x) const; +}; + +// Kaiser filter. +class KaiserFilter : public Filter +{ +public: + KaiserFilter(float w); + virtual float evaluate(float x) const; + + void setParameters(float a, float stretch); + +private: + float alpha; + float stretch; +}; + + + +/// A 1D kernel. Used to precompute filter weights. +class Kernel1 +{ +public: + Kernel1(const Filter & f, int iscale, int samples = 32); + ~Kernel1(); + + float valueAt(uint x) const { + return m_data[x]; + } + + int windowSize() const { + return m_windowSize; + } + + float width() const { + return m_width; + } + + void debugPrint(); + +private: + int m_windowSize; + float m_width; + float * m_data; +}; + + +/// A 2D kernel. +class Kernel2 +{ +public: + Kernel2(uint width); + Kernel2(const Kernel2 & k); + ~Kernel2(); + + void normalize(); + void transpose(); + + float valueAt(uint x, uint y) const { + return m_data[y * m_windowSize + x]; + } + + uint windowSize() const { + return m_windowSize; + } + +private: + const uint m_windowSize; + float * m_data; +}; + + +/// A 1D polyphase kernel +class PolyphaseKernel +{ +public: + PolyphaseKernel(const Filter & f, uint srcLength, uint dstLength, int samples = 32); + ~PolyphaseKernel(); + + int windowSize() const { + return m_windowSize; + } + + uint length() const { + return m_length; + } + + float width() const { + return m_width; + } + + float valueAt(uint column, uint x) const { + return m_data[column * m_windowSize + x]; + } + + void debugPrint() const; + +private: + int m_windowSize; + uint m_length; + float m_width; + float * m_data; +}; + +#endif // NV_IMAGE_FILTER_H diff --git a/FloatImage.cpp b/FloatImage.cpp new file mode 100644 index 0000000..8b092b5 --- /dev/null +++ b/FloatImage.cpp @@ -0,0 +1,828 @@ +// This code is in the public domain -- castanyo@yahoo.es + +//#include +//#include + +//#include + +#include +#include +#include +#include "FloatImage.h" +#include "Filter.h" +//#include "Image.h" + +#include +#include + +static int iround(float f) +{ + return int(f); +} + +static int ifloor(float f) +{ + return int(floor(f)); +} + +static float frac(float f) +{ + return f - floor(f); +} + +static int mirror(int x, int w) +{ + x = abs(x); + while (x >= w) { + x = 2 * w - x - 2; + } + return x; +} + + +/// Ctor. +FloatImage::FloatImage() : m_width(0), m_height(0), + m_componentNum(0), m_count(0), m_mem(NULL) +{ +} + +/*/// Ctor. Init from image. +FloatImage::FloatImage(const Image * img) : m_width(0), m_height(0), + m_componentNum(0), m_count(0), m_mem(NULL) +{ + initFrom(img); +} +*/ + +/// Dtor. +FloatImage::~FloatImage() +{ + free(); +} + +/* +/// Init the floating point image from a regular image. +void FloatImage::initFrom(const Image * img) +{ + nvCheck(img != NULL); + + allocate(4, img->width(), img->height()); + + float * red_channel = channel(0); + float * green_channel = channel(1); + float * blue_channel = channel(2); + float * alpha_channel = channel(3); + + const uint count = m_width * m_height; + for(uint i = 0; i < count; i++) { + Color32 pixel = img->pixel(i); + red_channel[i] = float(pixel.r) / 255.0f; + green_channel[i] = float(pixel.g) / 255.0f; + blue_channel[i] = float(pixel.b) / 255.0f; + alpha_channel[i] = float(pixel.a) / 255.0f; + } +} +*/ + + #if 0 +/// Convert the floating point image to a regular image. +Image * FloatImage::createImage(uint base_component/*= 0*/, uint num/*= 4*/) const +{ +// nvCheck(num <= 4); +// nvCheck(base_component + num <= m_componentNum); + + AutoPtr img(new Image()); + img->allocate(m_width, m_height); + + const uint size = m_width * m_height; + for(uint i = 0; i < size; i++) { + + uint c; + uint8 rgba[4]= {0, 0, 0, 0xff}; + + for(c = 0; c < num; c++) { + float f = m_mem[size * (base_component + c) + i]; + rgba[c] = nv::clamp(int(255.0f * f), 0, 255); + } + + img->pixel(i) = Color32(rgba[0], rgba[1], rgba[2], rgba[3]); + } + + return img.release(); +} + + +/// Convert the floating point image to a regular image. Correct gamma of rgb, but not alpha. +Image * FloatImage::createImageGammaCorrect(float gamma/*= 2.2f*/) const +{ +// nvCheck(m_componentNum == 4); + + AutoPtr img(new Image()); + img->allocate(m_width, m_height); + + const float * rChannel = this->channel(0); + const float * gChannel = this->channel(1); + const float * bChannel = this->channel(2); + const float * aChannel = this->channel(3); + + const uint size = m_width * m_height; + for(uint i = 0; i < size; i++) + { + const uint8 r = nv::clamp(int(255.0f * pow(rChannel[i], 1.0f/gamma)), 0, 255); + const uint8 g = nv::clamp(int(255.0f * pow(gChannel[i], 1.0f/gamma)), 0, 255); + const uint8 b = nv::clamp(int(255.0f * pow(bChannel[i], 1.0f/gamma)), 0, 255); + const uint8 a = nv::clamp(int(255.0f * aChannel[i]), 0, 255); + + img->pixel(i) = Color32(r, g, b, a); + } + + return img.release(); +} +#endif + +/// Allocate a 2d float image of the given format and the given extents. +void FloatImage::allocate(uint c, uint w, uint h) +{ +// nvCheck(m_mem == NULL); + m_width = w; + m_height = h; + m_componentNum = c; + m_count = w * h * c; +// m_mem = reinterpret_cast(nv::mem::malloc(m_count * sizeof(float))); + m_mem = reinterpret_cast(malloc(m_count * sizeof(float))); +} + +/// Free the image, but don't clear the members. +void FloatImage::free() +{ +// nvCheck(m_mem != NULL); +// nv::mem::free( reinterpret_cast(m_mem) ); + ::free(m_mem); + m_mem = NULL; +} + +void FloatImage::clear(float f/*=0.0f*/) +{ + for(uint i = 0; i < m_count; i++) { + m_mem[i] = f; + } +} + +#if 0 +void FloatImage::normalize(uint base_component) +{ +// nvCheck(base_component + 3 <= m_componentNum); + + float * xChannel = this->channel(base_component + 0); + float * yChannel = this->channel(base_component + 1); + float * zChannel = this->channel(base_component + 2); + + const uint size = m_width * m_height; + for(uint i = 0; i < size; i++) { + + Vector3 normal(xChannel[i], yChannel[i], zChannel[i]); + normal = normalizeSafe(normal, Vector3(zero), 0.0f); + + xChannel[i] = normal.x(); + yChannel[i] = normal.y(); + zChannel[i] = normal.z(); + } +} +#endif + +void FloatImage::packNormals(uint base_component) +{ + scaleBias(base_component, 3, 0.5f, 1.0f); +} + +void FloatImage::expandNormals(uint base_component) +{ + scaleBias(base_component, 3, 2, -0.5); +} + +void FloatImage::scaleBias(uint base_component, uint num, float scale, float bias) +{ + const uint size = m_width * m_height; + + for(uint c = 0; c < num; c++) { + float * ptr = this->channel(base_component + c); + + for(uint i = 0; i < size; i++) { + ptr[i] = scale * (ptr[i] + bias); + } + } +} + +/// Clamp the elements of the image. +void FloatImage::clamp(float low, float high) +{ + for(uint i = 0; i < m_count; i++) { + m_mem[i] = ::clamp(m_mem[i], low, high); + } +} + +/// From gamma to linear space. +void FloatImage::toLinear(uint base_component, uint num, float gamma /*= 2.2f*/) +{ + exponentiate(base_component, num, gamma); +} + +/// From linear to gamma space. +void FloatImage::toGamma(uint base_component, uint num, float gamma /*= 2.2f*/) +{ + exponentiate(base_component, num, 1.0f/gamma); +} + +/// Exponentiate the elements of the image. +void FloatImage::exponentiate(uint base_component, uint num, float power) +{ + const uint size = m_width * m_height; + + for(uint c = 0; c < num; c++) { + float * ptr = this->channel(base_component + c); + + for(uint i = 0; i < size; i++) { + ptr[i] = pow(ptr[i], power); + } + } +} + +float FloatImage::sampleNearest(const float x, const float y, const int c, const WrapMode wm) const +{ + if( wm == WrapMode_Clamp ) return sampleNearestClamp(x, y, c); + else if( wm == WrapMode_Repeat ) return sampleNearestRepeat(x, y, c); + else /*if( wm == WrapMode_Mirror )*/ return sampleNearestMirror(x, y, c); +} + +float FloatImage::sampleLinear(const float x, const float y, const int c, const WrapMode wm) const +{ + if( wm == WrapMode_Clamp ) return sampleLinearClamp(x, y, c); + else if( wm == WrapMode_Repeat ) return sampleLinearRepeat(x, y, c); + else /*if( wm == WrapMode_Mirror )*/ return sampleLinearMirror(x, y, c); +} + +float FloatImage::sampleNearestClamp(const float x, const float y, const int c) const +{ + int ix = ::clamp(iround(x * m_width), 0, (int) m_width-1); + int iy = ::clamp(iround(y * m_height), 0, (int) m_height-1); + return pixel(ix, iy, c); +} + +float FloatImage::sampleNearestRepeat(const float x, const float y, const int c) const +{ + int ix = iround(frac(x) * m_width); + int iy = iround(frac(y) * m_height); + return pixel(ix, iy, c); +} + +float FloatImage::sampleNearestMirror(const float x, const float y, const int c) const +{ + int ix = mirror(iround(x * m_width), m_width); + int iy = mirror(iround(y * m_height), m_height); + return pixel(ix, iy, c); +} + +float FloatImage::sampleLinearClamp(float x, float y, const int c) const +{ + const int w = m_width; + const int h = m_height; + + x *= w; + y *= h; + + const float fracX = frac(x); + const float fracY = frac(y); + + const int ix0 = ::clamp(ifloor(x), 0, w-1); + const int iy0 = ::clamp(ifloor(y), 0, h-1); + const int ix1 = ::clamp(ifloor(x)+1, 0, w-1); + const int iy1 = ::clamp(ifloor(y)+1, 0, h-1); + + float f1 = pixel(ix0, iy0, c); + float f2 = pixel(ix1, iy0, c); + float f3 = pixel(ix0, iy1, c); + float f4 = pixel(ix1, iy1, c); + + float i1 = lerp(f1, f2, fracX); + float i2 = lerp(f3, f4, fracX); + + return lerp(i1, i2, fracY); +} + +float FloatImage::sampleLinearRepeat(float x, float y, int c) const +{ + const int w = m_width; + const int h = m_height; + + const float fracX = frac(x * w); + const float fracY = frac(y * h); + + int ix0 = ifloor(frac(x) * w); + int iy0 = ifloor(frac(y) * h); + int ix1 = ifloor(frac(x + 1.0f/w) * w); + int iy1 = ifloor(frac(y + 1.0f/h) * h); + + float f1 = pixel(ix0, iy0, c); + float f2 = pixel(ix1, iy0, c); + float f3 = pixel(ix0, iy1, c); + float f4 = pixel(ix1, iy1, c); + + float i1 = lerp(f1, f2, fracX); + float i2 = lerp(f3, f4, fracX); + + return lerp(i1, i2, fracY); +} + +float FloatImage::sampleLinearMirror(float x, float y, int c) const +{ + const int w = m_width; + const int h = m_height; + + x *= w; + y *= h; + + const float fracX = frac(x); + const float fracY = frac(y); + + int ix0 = mirror(iround(x), w); + int iy0 = mirror(iround(y), h); + int ix1 = mirror(iround(x) + 1, w); + int iy1 = mirror(iround(y) + 1, h); + + float f1 = pixel(ix0, iy0, c); + float f2 = pixel(ix1, iy0, c); + float f3 = pixel(ix0, iy1, c); + float f4 = pixel(ix1, iy1, c); + + float i1 = lerp(f1, f2, fracX); + float i2 = lerp(f3, f4, fracX); + + return lerp(i1, i2, fracY); +} + + +/// Fast downsampling using box filter. +/// +/// The extents of the image are divided by two and rounded down. +/// +/// When the size of the image is odd, this uses a polyphase box filter as explained in: +/// http://developer.nvidia.com/object/np2_mipmapping.html +/// +FloatImage * FloatImage::fastDownSample() const +{ +// nvDebugCheck(m_width != 1 || m_height != 1); + + std::auto_ptr dst_image( new FloatImage() ); +// AutoPtr dst_image( new FloatImage() ); + + const uint w = std::max((unsigned int) 1, m_width / 2); + const uint h = std::max((unsigned int) 1, m_height / 2); + dst_image->allocate(m_componentNum, w, h); + + // 1D box filter. + if (m_width == 1 || m_height == 1) + { + const uint n = w * h; + + if (n & 1) + { + const float scale = 1.0f / (2 * n + 1); + + for(uint c = 0; c < m_componentNum; c++) + { + const float * src = this->channel(c); + float * dst = dst_image->channel(c); + + for(uint x = 0; x < n; x++) + { + const float w0 = float(n - x); + const float w1 = float(n - 0); + const float w2 = float(1 + x); + + *dst++ = scale * (w0 * src[0] + w1 * src[1] + w2 * src[2]); + src += 2; + } + } + } + else + { + for(uint c = 0; c < m_componentNum; c++) + { + const float * src = this->channel(c); + float * dst = dst_image->channel(c); + + for(uint x = 0; x < n; x++) + { + *dst = 0.5f * (src[0] + src[1]); + dst++; + src += 2; + } + } + } + } + + // Regular box filter. + else if ((m_width & 1) == 0 && (m_height & 1) == 0) + { + for(uint c = 0; c < m_componentNum; c++) + { + const float * src = this->channel(c); + float * dst = dst_image->channel(c); + + for(uint y = 0; y < h; y++) + { + for(uint x = 0; x < w; x++) + { + *dst = 0.25f * (src[0] + src[1] + src[m_width] + src[m_width + 1]); + dst++; + src += 2; + } + + src += m_width; + } + } + } + + // Polyphase filters. + else if (m_width & 1 && m_height & 1) + { +// nvDebugCheck(m_width == 2 * w + 1); +// nvDebugCheck(m_height == 2 * h + 1); + + const float scale = 1.0f / (m_width * m_height); + + for(uint c = 0; c < m_componentNum; c++) + { + const float * src = this->channel(c); + float * dst = dst_image->channel(c); + + for(uint y = 0; y < h; y++) + { + const float v0 = float(h - y); + const float v1 = float(h - 0); + const float v2 = float(1 + y); + + for (uint x = 0; x < w; x++) + { + const float w0 = float(w - x); + const float w1 = float(w - 0); + const float w2 = float(1 + x); + + float f = 0.0f; + f += v0 * (w0 * src[0 * m_width + 2 * x] + w1 * src[0 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]); + f += v1 * (w0 * src[1 * m_width + 2 * x] + w1 * src[1 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]); + f += v2 * (w0 * src[2 * m_width + 2 * x] + w1 * src[2 * m_width + 2 * x + 1] + w2 * src[0 * m_width + 2 * x + 2]); + + *dst = f * scale; + dst++; + } + + src += 2 * m_width; + } + } + } + else if (m_width & 1) + { +// nvDebugCheck(m_width == 2 * w + 1); + const float scale = 1.0f / (2 * m_width); + + for(uint c = 0; c < m_componentNum; c++) + { + const float * src = this->channel(c); + float * dst = dst_image->channel(c); + + for(uint y = 0; y < h; y++) + { + for (uint x = 0; x < w; x++) + { + const float w0 = float(w - x); + const float w1 = float(w - 0); + const float w2 = float(1 + x); + + float f = 0.0f; + f += w0 * (src[2 * x + 0] + src[m_width + 2 * x + 0]); + f += w1 * (src[2 * x + 1] + src[m_width + 2 * x + 1]); + f += w2 * (src[2 * x + 2] + src[m_width + 2 * x + 2]); + + *dst = f * scale; + dst++; + } + + src += 2 * m_width; + } + } + } + else if (m_height & 1) + { +// nvDebugCheck(m_height == 2 * h + 1); + + const float scale = 1.0f / (2 * m_height); + + for(uint c = 0; c < m_componentNum; c++) + { + const float * src = this->channel(c); + float * dst = dst_image->channel(c); + + for(uint y = 0; y < h; y++) + { + const float v0 = float(h - y); + const float v1 = float(h - 0); + const float v2 = float(1 + y); + + for (uint x = 0; x < w; x++) + { + float f = 0.0f; + f += v0 * (src[0 * m_width + 2 * x] + src[0 * m_width + 2 * x + 1]); + f += v1 * (src[1 * m_width + 2 * x] + src[1 * m_width + 2 * x + 1]); + f += v2 * (src[2 * m_width + 2 * x] + src[2 * m_width + 2 * x + 1]); + + *dst = f * scale; + dst++; + } + + src += 2 * m_width; + } + } + } + + return dst_image.release(); +} + +/* +/// Downsample applying a 1D kernel separately in each dimension. +FloatImage * FloatImage::downSample(const Kernel1 & kernel, WrapMode wm) const +{ + const uint w = max(1, m_width / 2); + const uint h = max(1, m_height / 2); + + return downSample(kernel, w, h, wm); +} + + +/// Downsample applying a 1D kernel separately in each dimension. +FloatImage * FloatImage::downSample(const Kernel1 & kernel, uint w, uint h, WrapMode wm) const +{ + nvCheck(!(kernel.windowSize() & 1)); // Make sure that kernel m_width is even. + + AutoPtr tmp_image( new FloatImage() ); + tmp_image->allocate(m_componentNum, w, m_height); + + AutoPtr dst_image( new FloatImage() ); + dst_image->allocate(m_componentNum, w, h); + + const float xscale = float(m_width) / float(w); + const float yscale = float(m_height) / float(h); + + for(uint c = 0; c < m_componentNum; c++) { + float * tmp_channel = tmp_image->channel(c); + + for(uint y = 0; y < m_height; y++) { + for(uint x = 0; x < w; x++) { + + float sum = this->applyKernelHorizontal(&kernel, uint(x*xscale), y, c, wm); + + const uint tmp_index = tmp_image->index(x, y); + tmp_channel[tmp_index] = sum; + } + } + + float * dst_channel = dst_image->channel(c); + + for(uint y = 0; y < h; y++) { + for(uint x = 0; x < w; x++) { + + float sum = tmp_image->applyKernelVertical(&kernel, uint(x*xscale), uint(y*yscale), c, wm); + + const uint dst_index = dst_image->index(x, y); + dst_channel[dst_index] = sum; + } + } + } + + return dst_image.release(); +} +*/ + +/// Downsample applying a 1D kernel separately in each dimension. +FloatImage * FloatImage::downSample(const Filter & filter, WrapMode wm) const +{ + const uint w = std::max((unsigned int) 1, m_width / 2); + const uint h = std::max((unsigned int) 1, m_height / 2); + + return downSample(filter, w, h, wm); +} + + +/// Downsample applying a 1D kernel separately in each dimension. +FloatImage * FloatImage::downSample(const Filter & filter, uint w, uint h, WrapMode wm) const +{ + // @@ Use monophase filters when frac(m_width / w) == 0 + +// AutoPtr tmp_image( new FloatImage() ); +// AutoPtr dst_image( new FloatImage() ); + std::auto_ptr tmp_image(new FloatImage() ); + std::auto_ptr dst_image(new FloatImage() ); + + PolyphaseKernel xkernel(filter, m_width, w, 32); + PolyphaseKernel ykernel(filter, m_height, h, 32); + + // @@ Select fastest filtering order: + //if (w * m_height <= h * m_width) + { + tmp_image->allocate(m_componentNum, w, m_height); + dst_image->allocate(m_componentNum, w, h); + +// Array tmp_column(h); + std::vector tmp_column(h); + tmp_column.resize(h); + + for (uint c = 0; c < m_componentNum; c++) + { + float * tmp_channel = tmp_image->channel(c); + + for (uint y = 0; y < m_height; y++) { + this->applyKernelHorizontal(xkernel, y, c, wm, tmp_channel + y * w); + } + + float * dst_channel = dst_image->channel(c); + + for (uint x = 0; x < w; x++) { + tmp_image->applyKernelVertical(ykernel, x, c, wm, &tmp_column[0]); + + for (uint y = 0; y < h; y++) { + dst_channel[y * w + x] = tmp_column[y]; + } + } + } + } + /*else + { + tmp_image->allocate(m_componentNum, m_width, h); + dst_image->allocate(m_componentNum, w, h); + + Array tmp_column(h); + tmp_column.resize(h); + + for (uint c = 0; c < m_componentNum; c++) + { + float * tmp_channel = tmp_image->channel(c); + + for (uint x = 0; x < w; x++) { + tmp_image->applyKernelVertical(ykernel, x, c, wm, tmp_column.unsecureBuffer()); + + for (uint y = 0; y < h; y++) { + tmp_channel[y * w + x] = tmp_column[y]; + } + } + + float * dst_channel = dst_image->channel(c); + + for (uint y = 0; y < m_height; y++) { + this->applyKernelHorizontal(xkernel, y, c, wm, dst_channel + y * w); + } + } + }*/ + + return dst_image.release(); +} + + + +/// Apply 2D kernel at the given coordinates and return result. +float FloatImage::applyKernel(const Kernel2 * k, int x, int y, int c, WrapMode wm) const +{ +// nvDebugCheck(k != NULL); + + const uint kernelWindow = k->windowSize(); + const int kernelOffset = int(kernelWindow / 2) - 1; + + const float * channel = this->channel(c); + + float sum = 0.0f; + for (uint i = 0; i < kernelWindow; i++) + { + const int src_y = int(y + i) - kernelOffset; + + for (uint e = 0; e < kernelWindow; e++) + { + const int src_x = int(x + e) - kernelOffset; + + int idx = this->index(src_x, src_y, wm); + + sum += k->valueAt(e, i) * channel[idx]; + } + } + + return sum; +} + + +/// Apply 1D vertical kernel at the given coordinates and return result. +float FloatImage::applyKernelVertical(const Kernel1 * k, int x, int y, int c, WrapMode wm) const +{ +// nvDebugCheck(k != NULL); + + const uint kernelWindow = k->windowSize(); + const int kernelOffset = int(kernelWindow / 2) - 1; + + const float * channel = this->channel(c); + + float sum = 0.0f; + for (uint i = 0; i < kernelWindow; i++) + { + const int src_y = int(y + i) - kernelOffset; + const int idx = this->index(x, src_y, wm); + + sum += k->valueAt(i) * channel[idx]; + } + + return sum; +} + +/// Apply 1D horizontal kernel at the given coordinates and return result. +float FloatImage::applyKernelHorizontal(const Kernel1 * k, int x, int y, int c, WrapMode wm) const +{ +// nvDebugCheck(k != NULL); + + const uint kernelWindow = k->windowSize(); + const int kernelOffset = int(kernelWindow / 2) - 1; + + const float * channel = this->channel(c); + + float sum = 0.0f; + for (uint e = 0; e < kernelWindow; e++) + { + const int src_x = int(x + e) - kernelOffset; + const int idx = this->index(src_x, y, wm); + + sum += k->valueAt(e) * channel[idx]; + } + + return sum; +} + + +/// Apply 1D vertical kernel at the given coordinates and return result. +void FloatImage::applyKernelVertical(const PolyphaseKernel & k, int x, int c, WrapMode wm, float * output) const +{ + const uint length = k.length(); + const float scale = float(length) / float(m_height); + const float iscale = 1.0f / scale; + + const float width = k.width(); + const int windowSize = k.windowSize(); + + const float * channel = this->channel(c); + + for (uint i = 0; i < length; i++) + { + const float center = (0.5f + i) * iscale; + + const int left = (int)floorf(center - width); + const int right = (int)ceilf(center + width); +// nvCheck(right - left <= windowSize); + + float sum = 0; + for (int j = 0; j < windowSize; ++j) + { + const int idx = this->index(x, j+left, wm); + + sum += k.valueAt(i, j) * channel[idx]; + } + + output[i] = sum; + } +} + +/// Apply 1D horizontal kernel at the given coordinates and return result. +void FloatImage::applyKernelHorizontal(const PolyphaseKernel & k, int y, int c, WrapMode wm, float * output) const +{ + const uint length = k.length(); + const float scale = float(length) / float(m_width); + const float iscale = 1.0f / scale; + + const float width = k.width(); + const int windowSize = k.windowSize(); + + const float * channel = this->channel(c); + + for (uint i = 0; i < length; i++) + { + const float center = (0.5f + i) * iscale; + + const int left = (int)floorf(center - width); + const int right = (int)ceilf(center + width); +// nvDebugCheck(right - left <= windowSize); + + float sum = 0; + for (int j = 0; j < windowSize; ++j) + { + const int idx = this->index(left + j, y, wm); + + sum += k.valueAt(i, j) * channel[idx]; + } + + output[i] = sum; + } +} + diff --git a/FloatImage.h b/FloatImage.h new file mode 100644 index 0000000..c9e2a7c --- /dev/null +++ b/FloatImage.h @@ -0,0 +1,243 @@ +// This code is in the public domain -- castanyo@yahoo.es + +#ifndef NV_IMAGE_FLOATIMAGE_H +#define NV_IMAGE_FLOATIMAGE_H + +//#include +//#include // clamp +//#include + +#include + +class Filter; +class Kernel1; +class Kernel2; +class PolyphaseKernel; + +#define uint unsigned int + +/// Clamp between two values. +template +inline const T & clamp(const T & x, const T & a, const T & b) +{ + return std::min(std::max(x, a), b); +} + +inline float lerp(float f0, float f1, float t) +{ + const float s = 1.0f - t; + return f0 * s + f1 * t; +} + +/// Multicomponent floating point image class. +class FloatImage +{ +public: + + enum WrapMode { + WrapMode_Clamp, + WrapMode_Repeat, + WrapMode_Mirror + }; + + FloatImage(); +// FloatImage(const Image * img); + virtual ~FloatImage(); + + /** @name Conversion. */ + //@{ +/* + void initFrom(const Image * img); + Image * createImage(uint base_component = 0, uint num = 4) const; + Image * createImageGammaCorrect(float gamma = 2.2f) const; +*/ + //@} + + /** @name Allocation. */ + //@{ + void allocate(uint c, uint w, uint h); + void free(); // Does not clear members. + //@} + + /** @name Manipulation. */ + //@{ + void clear(float f=0.0f); + +// void normalize(uint base_component); + + void packNormals(uint base_component); + void expandNormals(uint base_component); + void scaleBias(uint base_component, uint num, float scale, float add); + + //NVIMAGE_API void clamp(uint base_component, uint num); + void clamp(float low, float high); + + void toLinear(uint base_component, uint num, float gamma = 2.2f); + void toGamma(uint base_component, uint num, float gamma = 2.2f); + void exponentiate(uint base_component, uint num, float power); + + + FloatImage * fastDownSample() const; + FloatImage * downSample(const Filter & filter, WrapMode wm) const; + FloatImage * downSample(const Filter & filter, uint w, uint h, WrapMode wm) const; + + //NVIMAGE_API FloatImage * downSample(const Kernel1 & filter, WrapMode wm) const; + //NVIMAGE_API FloatImage * downSample(const Kernel1 & filter, uint w, uint h, WrapMode wm) const; + //@} + + float applyKernel(const Kernel2 * k, int x, int y, int c, WrapMode wm) const; + float applyKernelVertical(const Kernel1 * k, int x, int y, int c, WrapMode wm) const; + float applyKernelHorizontal(const Kernel1 * k, int x, int y, int c, WrapMode wm) const; + void applyKernelVertical(const PolyphaseKernel & k, int x, int c, WrapMode wm, float * output) const; + void applyKernelHorizontal(const PolyphaseKernel & k, int y, int c, WrapMode wm, float * output) const; + + + uint width() const { return m_width; } + uint height() const { return m_height; } + uint componentNum() const { return m_componentNum; } + uint count() const { return m_count; } + + + /** @name Pixel access. */ + //@{ + const float * channel(uint c) const; + float * channel(uint c); + + const float * scanline(uint y, uint c) const; + float * scanline(uint y, uint c); + + void setPixel(float f, uint x, uint y, uint c); + void addPixel(float f, uint x, uint y, uint c); + float pixel(uint x, uint y, uint c) const; + + void setPixel(float f, uint idx); + float pixel(uint idx) const; + + float sampleNearest(float x, float y, int c, WrapMode wm) const; + float sampleLinear(float x, float y, int c, WrapMode wm) const; + + float sampleNearestClamp(float x, float y, int c) const; + float sampleNearestRepeat(float x, float y, int c) const; + float sampleNearestMirror(float x, float y, int c) const; + + float sampleLinearClamp(float x, float y, int c) const; + float sampleLinearRepeat(float x, float y, int c) const; + float sampleLinearMirror(float x, float y, int c) const; + //@} + +public: + + uint index(uint x, uint y) const; + uint indexClamp(int x, int y) const; + uint indexRepeat(int x, int y) const; + uint indexMirror(int x, int y) const; + uint index(int x, int y, WrapMode wm) const; + +public: + + uint m_width; ///< Width of the texture. + uint m_height; ///< Height of the texture. + uint m_componentNum; ///< Number of components. + uint m_count; ///< Image pixel count. + float * m_mem; + +}; + + +/// Get const channel pointer. +inline const float * FloatImage::channel(uint c) const +{ + return m_mem + c * m_width * m_height; +} + +/// Get channel pointer. +inline float * FloatImage::channel(uint c) { + return m_mem + c * m_width * m_height; +} + +/// Get const scanline pointer. +inline const float * FloatImage::scanline(uint y, uint c) const +{ + return channel(c) + y * m_width; +} + +/// Get scanline pointer. +inline float * FloatImage::scanline(uint y, uint c) +{ + return channel(c) + y * m_width; +} + +/// Set pixel component. +inline void FloatImage::setPixel(float f, uint x, uint y, uint c) +{ + m_mem[(c * m_height + y) * m_width + x] = f; +} + +/// Add to pixel component. +inline void FloatImage::addPixel(float f, uint x, uint y, uint c) +{ + m_mem[(c * m_height + y) * m_width + x] += f; +} + +/// Get pixel component. +inline float FloatImage::pixel(uint x, uint y, uint c) const +{ + return m_mem[(c * m_height + y) * m_width + x]; +} + +/// Set pixel component. +inline void FloatImage::setPixel(float f, uint idx) +{ + m_mem[idx] = f; +} + +/// Get pixel component. +inline float FloatImage::pixel(uint idx) const +{ + return m_mem[idx]; +} + +inline uint FloatImage::index(uint x, uint y) const +{ + return y * m_width + x; +} + +inline uint FloatImage::indexClamp(int x, int y) const +{ + return ::clamp(y, int(0), int(m_height-1)) * m_width + ::clamp(x, int(0), int(m_width-1)); +} + +inline int repeat_remainder(int a, int b) +{ + if (a >= 0) return a % b; + else return (a + 1) % b + b - 1; +} + +inline uint FloatImage::indexRepeat(int x, int y) const +{ + return repeat_remainder(y, m_height) * m_width + repeat_remainder(x, m_width); +} + +inline uint FloatImage::indexMirror(int x, int y) const +{ + x = abs(x); + while (x >= m_width) { + x = m_width + m_width - x - 2; + } + + y = abs(y); + while (y >= m_height) { + y = m_height + m_height - y - 2; + } + + return index(x, y); +} + +inline uint FloatImage::index(int x, int y, WrapMode wm) const +{ + if (wm == WrapMode_Clamp) return indexClamp(x, y); + if (wm == WrapMode_Repeat) return indexRepeat(x, y); + /*if (wm == WrapMode_Mirror)*/ return indexMirror(x, y); +} + +#endif // NV_IMAGE_FLOATIMAGE_H diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..a1e89e1 --- /dev/null +++ b/INSTALL @@ -0,0 +1,370 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..58ca9ca --- /dev/null +++ b/Makefile.am @@ -0,0 +1,26 @@ +AUTOMAKE_OPTIONS=foreign + +if MAKE_WINDOWS +bin_PROGRAMS = Aorta +else +bin_PROGRAMS = aorta +endif + +EXTRA_DIST = \ + "Aorta File.icns" Aorta.icns Aorta.ico aorta.rc \ + Aorta-Info.plist Aorta.xcodeproj/project.pbxproj \ + Makefile README VERSION COPYING + +aorta_SOURCES = aorta.cpp aorta.h \ + DDSOptionsDialog.cpp DDSOptionsDialog.h \ + Filter.cpp Filter.h FloatImage.cpp FloatImage.h \ + imagdds.cpp imagdds.h image_ext.cpp image_ext.h + +aorta_LDADD = \ + -lsquish + +Aorta_LDADD = $(aorta_LDADD) aorta-resources.o +Aorta_SOURCES = $(aorta_SOURCES) + +aorta-resources.o: aorta.rc + @WX_RESCOMP@ -o aorta-resources.o -I$(srcdir) $(srcdir)/aorta.rc diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..f4d472a --- /dev/null +++ b/Makefile.in @@ -0,0 +1,682 @@ +# Makefile.in generated by automake 1.11.2 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +@MAKE_WINDOWS_FALSE@bin_PROGRAMS = aorta$(EXEEXT) +@MAKE_WINDOWS_TRUE@bin_PROGRAMS = Aorta$(EXEEXT) +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + config.guess config.sub depcomp install-sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__objects_1 = aorta.$(OBJEXT) DDSOptionsDialog.$(OBJEXT) \ + Filter.$(OBJEXT) FloatImage.$(OBJEXT) imagdds.$(OBJEXT) \ + image_ext.$(OBJEXT) +am_Aorta_OBJECTS = $(am__objects_1) +Aorta_OBJECTS = $(am_Aorta_OBJECTS) +am__DEPENDENCIES_1 = +Aorta_DEPENDENCIES = $(am__DEPENDENCIES_1) aorta-resources.o +am_aorta_OBJECTS = aorta.$(OBJEXT) DDSOptionsDialog.$(OBJEXT) \ + Filter.$(OBJEXT) FloatImage.$(OBJEXT) imagdds.$(OBJEXT) \ + image_ext.$(OBJEXT) +aorta_OBJECTS = $(am_aorta_OBJECTS) +aorta_DEPENDENCIES = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(Aorta_SOURCES) $(aorta_SOURCES) +DIST_SOURCES = $(Aorta_SOURCES) $(aorta_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +WX_CFLAGS = @WX_CFLAGS@ +WX_CFLAGS_ONLY = @WX_CFLAGS_ONLY@ +WX_CONFIG_PATH = @WX_CONFIG_PATH@ +WX_CPPFLAGS = @WX_CPPFLAGS@ +WX_CXXFLAGS = @WX_CXXFLAGS@ +WX_CXXFLAGS_ONLY = @WX_CXXFLAGS_ONLY@ +WX_LIBS = @WX_LIBS@ +WX_LIBS_STATIC = @WX_LIBS_STATIC@ +WX_RESCOMP = @WX_RESCOMP@ +WX_VERSION = @WX_VERSION@ +WX_VERSION_MAJOR = @WX_VERSION_MAJOR@ +WX_VERSION_MICRO = @WX_VERSION_MICRO@ +WX_VERSION_MINOR = @WX_VERSION_MINOR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +EXTRA_DIST = \ + "Aorta File.icns" Aorta.icns Aorta.ico aorta.rc \ + Aorta-Info.plist Aorta.xcodeproj/project.pbxproj \ + Makefile README VERSION COPYING + +aorta_SOURCES = aorta.cpp aorta.h \ + DDSOptionsDialog.cpp DDSOptionsDialog.h \ + Filter.cpp Filter.h FloatImage.cpp FloatImage.h \ + imagdds.cpp imagdds.h image_ext.cpp image_ext.h + +aorta_LDADD = \ + -lsquish + +Aorta_LDADD = $(aorta_LDADD) aorta-resources.o +Aorta_SOURCES = $(aorta_SOURCES) +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .cpp .o .obj +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +Aorta$(EXEEXT): $(Aorta_OBJECTS) $(Aorta_DEPENDENCIES) + @rm -f Aorta$(EXEEXT) + $(CXXLINK) $(Aorta_OBJECTS) $(Aorta_LDADD) $(LIBS) +aorta$(EXEEXT): $(aorta_OBJECTS) $(aorta_DEPENDENCIES) + @rm -f aorta$(EXEEXT) + $(CXXLINK) $(aorta_OBJECTS) $(aorta_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DDSOptionsDialog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Filter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FloatImage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aorta.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imagdds.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_ext.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) config.h +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: all install-am install-strip + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS + + +aorta-resources.o: aorta.rc + @WX_RESCOMP@ -o aorta-resources.o -I$(srcdir) $(srcdir)/aorta.rc + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..f8e38e5 --- /dev/null +++ b/README @@ -0,0 +1,10 @@ +Aorta is a utility for creating high quality DDS textures. + +Aorta is licensed under the GNU Public License. See the file COPYING for +details. + +Aorta is copyright 2006-2008 by Gregory Smith + +Special thanks go to: +Simon Brown for his squish library +Ignacio Castano for open source nvidia texture tools diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..879b416 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.1 diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..e2cc935 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,2033 @@ +# generated automatically by aclocal 1.11.2 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +dnl --------------------------------------------------------------------------- +dnl Author: wxWidgets development team, +dnl Francesco Montorsi, +dnl Bob McCown (Mac-testing) +dnl Creation date: 24/11/2001 +dnl RCS-ID: $Id$ +dnl --------------------------------------------------------------------------- + +dnl =========================================================================== +dnl Table of Contents of this macro file: +dnl ------------------------------------- +dnl +dnl SECTION A: wxWidgets main macros +dnl - WX_CONFIG_OPTIONS +dnl - WX_CONFIG_CHECK +dnl - WXRC_CHECK +dnl - WX_STANDARD_OPTIONS +dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS +dnl - WX_DETECT_STANDARD_OPTION_VALUES +dnl +dnl SECTION B: wxWidgets-related utilities +dnl - WX_LIKE_LIBNAME +dnl - WX_ARG_ENABLE_YESNOAUTO +dnl - WX_ARG_WITH_YESNOAUTO +dnl +dnl SECTION C: messages to the user +dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG +dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN +dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END +dnl - WX_BOOLOPT_SUMMARY +dnl +dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra +dnl debug output on stdout from these macros. +dnl =========================================================================== + + +dnl --------------------------------------------------------------------------- +dnl Macros for wxWidgets detection. Typically used in configure.in as: +dnl +dnl AC_ARG_ENABLE(...) +dnl AC_ARG_WITH(...) +dnl ... +dnl WX_CONFIG_OPTIONS +dnl ... +dnl ... +dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1]) +dnl if test "$wxWin" != 1; then +dnl AC_MSG_ERROR([ +dnl wxWidgets must be installed on your system +dnl but wx-config script couldn't be found. +dnl +dnl Please check that wx-config is in path, the directory +dnl where wxWidgets libraries are installed (returned by +dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or +dnl equivalent variable and wxWidgets version is 2.3.4 or above. +dnl ]) +dnl fi +dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" +dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" +dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" +dnl +dnl LIBS="$LIBS $WX_LIBS" +dnl +dnl If you want to support standard --enable-debug/unicode/shared options, you +dnl may do the following: +dnl +dnl ... +dnl AC_CANONICAL_SYSTEM +dnl +dnl # define configure options +dnl WX_CONFIG_OPTIONS +dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared]) +dnl +dnl # basic configure checks +dnl ... +dnl +dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE +dnl WX_DEBUG=$DEBUG +dnl WX_UNICODE=$UNICODE +dnl +dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS +dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS]) +dnl WX_DETECT_STANDARD_OPTION_VALUES +dnl +dnl # write the output files +dnl AC_CONFIG_FILES([Makefile ...]) +dnl AC_OUTPUT +dnl +dnl # optional: just to show a message to the user +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG +dnl +dnl --------------------------------------------------------------------------- + + +dnl --------------------------------------------------------------------------- +dnl WX_CONFIG_OPTIONS +dnl +dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and +dnl --wx-config command line options +dnl --------------------------------------------------------------------------- + +AC_DEFUN([WX_CONFIG_OPTIONS], +[ + AC_ARG_WITH(wxdir, + [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], + [ wx_config_name="$withval/wx-config" + wx_config_args="--inplace"]) + AC_ARG_WITH(wx-config, + [ --with-wx-config=CONFIG wx-config script to use (optional)], + wx_config_name="$withval" ) + AC_ARG_WITH(wx-prefix, + [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], + wx_config_prefix="$withval", wx_config_prefix="") + AC_ARG_WITH(wx-exec-prefix, + [ --with-wx-exec-prefix=PREFIX + Exec prefix where wxWidgets is installed (optional)], + wx_config_exec_prefix="$withval", wx_config_exec_prefix="") +]) + +dnl Helper macro for checking if wx version is at least $1.$2.$3, set's +dnl wx_ver_ok=yes if it is: +AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], +[ + wx_ver_ok="" + if test "x$WX_VERSION" != x ; then + if test $wx_config_major_version -gt $1; then + wx_ver_ok=yes + else + if test $wx_config_major_version -eq $1; then + if test $wx_config_minor_version -gt $2; then + wx_ver_ok=yes + else + if test $wx_config_minor_version -eq $2; then + if test $wx_config_micro_version -ge $3; then + wx_ver_ok=yes + fi + fi + fi + fi + fi + fi +]) + +dnl --------------------------------------------------------------------------- +dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) +dnl +dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC +dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME +dnl environment variable to override the default name of the wx-config script +dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this +dnl case the macro won't even waste time on tests for its existence. +dnl +dnl Optional WX-LIBS argument contains comma- or space-separated list of +dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS +dnl and WX_LIBS_STATIC will contain flags to link with all of the core +dnl wxWidgets libraries. +dnl +dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config +dnl invocation command in present. It can be used to fine-tune lookup of +dnl best wxWidgets build available. +dnl +dnl Example use: +dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] +dnl [--unicode --debug]) +dnl --------------------------------------------------------------------------- + +dnl +dnl Get the cflags and libraries from the wx-config script +dnl +AC_DEFUN([WX_CONFIG_CHECK], +[ + dnl do we have wx-config name: it can be wx-config or wxd-config or ... + if test x${WX_CONFIG_NAME+set} != xset ; then + WX_CONFIG_NAME=wx-config + fi + + if test "x$wx_config_name" != x ; then + WX_CONFIG_NAME="$wx_config_name" + fi + + dnl deal with optional prefixes + if test x$wx_config_exec_prefix != x ; then + wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" + WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" + fi + if test x$wx_config_prefix != x ; then + wx_config_args="$wx_config_args --prefix=$wx_config_prefix" + WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" + fi + if test "$cross_compiling" = "yes"; then + wx_config_args="$wx_config_args --host=$host_alias" + fi + + dnl don't search the PATH if WX_CONFIG_NAME is absolute filename + if test -x "$WX_CONFIG_NAME" ; then + AC_MSG_CHECKING(for wx-config) + WX_CONFIG_PATH="$WX_CONFIG_NAME" + AC_MSG_RESULT($WX_CONFIG_PATH) + else + AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") + fi + + if test "$WX_CONFIG_PATH" != "no" ; then + WX_VERSION="" + + min_wx_version=ifelse([$1], ,2.2.1,$1) + if test -z "$5" ; then + AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) + else + AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) + fi + + dnl don't add the libraries ($4) to this variable as this would result in + dnl an error when it's used with --version below + WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" + + WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` + wx_config_major_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + wx_config_minor_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + wx_config_micro_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + wx_requested_major_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + wx_requested_minor_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + wx_requested_micro_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], + [$wx_requested_minor_version], + [$wx_requested_micro_version]) + + if test -n "$wx_ver_ok"; then + AC_MSG_RESULT(yes (version $WX_VERSION)) + WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4` + + dnl is this even still appropriate? --static is a real option now + dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is + dnl what the user actually wants, making this redundant at best. + dnl For now keep it in case anyone actually used it in the past. + AC_MSG_CHECKING([for wxWidgets static library]) + WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null` + if test "x$WX_LIBS_STATIC" = "x"; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + + dnl starting with version 2.2.6 wx-config has --cppflags argument + wx_has_cppflags="" + if test $wx_config_major_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_minor_version -eq 2; then + if test $wx_config_micro_version -ge 6; then + wx_has_cppflags=yes + fi + fi + fi + fi + fi + + dnl starting with version 2.7.0 wx-config has --rescomp option + wx_has_rescomp="" + if test $wx_config_major_version -gt 2; then + wx_has_rescomp=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -ge 7; then + wx_has_rescomp=yes + fi + fi + fi + if test "x$wx_has_rescomp" = x ; then + dnl cannot give any useful info for resource compiler + WX_RESCOMP= + else + WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` + fi + + if test "x$wx_has_cppflags" = x ; then + dnl no choice but to define all flags like CFLAGS + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` + WX_CPPFLAGS=$WX_CFLAGS + WX_CXXFLAGS=$WX_CFLAGS + + WX_CFLAGS_ONLY=$WX_CFLAGS + WX_CXXFLAGS_ONLY=$WX_CFLAGS + else + dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS + WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4` + WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4` + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` + + WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` + WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` + fi + + ifelse([$2], , :, [$2]) + + else + + if test "x$WX_VERSION" = x; then + dnl no wx-config at all + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) + fi + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + + if test ! -z "$5"; then + + wx_error_message=" + The configuration you asked for $PACKAGE_NAME requires a wxWidgets + build with the following settings: + $5 + but such build is not available. + + To see the wxWidgets builds available on this system, please use + 'wx-config --list' command. To use the default build, returned by + 'wx-config --selected-config', use the options with their 'auto' + default values." + + fi + + wx_error_message=" + The requested wxWidgets build couldn't be found. + $wx_error_message + + If you still get this error, then check that 'wx-config' is + in path, the directory where wxWidgets libraries are installed + (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH + or equivalent variable and wxWidgets version is $1 or above." + + ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3]) + + fi + else + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + + ifelse([$3], , :, [$3]) + + fi + + AC_SUBST(WX_CPPFLAGS) + AC_SUBST(WX_CFLAGS) + AC_SUBST(WX_CXXFLAGS) + AC_SUBST(WX_CFLAGS_ONLY) + AC_SUBST(WX_CXXFLAGS_ONLY) + AC_SUBST(WX_LIBS) + AC_SUBST(WX_LIBS_STATIC) + AC_SUBST(WX_VERSION) + AC_SUBST(WX_RESCOMP) + + dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols + dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness): + WX_VERSION_MAJOR="$wx_config_major_version" + WX_VERSION_MINOR="$wx_config_minor_version" + WX_VERSION_MICRO="$wx_config_micro_version" + AC_SUBST(WX_VERSION_MAJOR) + AC_SUBST(WX_VERSION_MINOR) + AC_SUBST(WX_VERSION_MICRO) +]) + +dnl --------------------------------------------------------------------------- +dnl Get information on the wxrc program for making C++, Python and xrs +dnl resource files. +dnl +dnl AC_ARG_ENABLE(...) +dnl AC_ARG_WITH(...) +dnl ... +dnl WX_CONFIG_OPTIONS +dnl ... +dnl WX_CONFIG_CHECK(2.6.0, wxWin=1) +dnl if test "$wxWin" != 1; then +dnl AC_MSG_ERROR([ +dnl wxWidgets must be installed on your system +dnl but wx-config script couldn't be found. +dnl +dnl Please check that wx-config is in path, the directory +dnl where wxWidgets libraries are installed (returned by +dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or +dnl equivalent variable and wxWidgets version is 2.6.0 or above. +dnl ]) +dnl fi +dnl +dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0]) +dnl if test "x$HAVE_WXRC" != x1; then +dnl AC_MSG_ERROR([ +dnl The wxrc program was not installed or not found. +dnl +dnl Please check the wxWidgets installation. +dnl ]) +dnl fi +dnl +dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" +dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" +dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" +dnl +dnl LDFLAGS="$LDFLAGS $WX_LIBS" +dnl --------------------------------------------------------------------------- + +dnl --------------------------------------------------------------------------- +dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS +dnl resources. The variable WXRC will be set and substituted in the configure +dnl script and Makefiles. +dnl +dnl Example use: +dnl WXRC_CHECK([wxrc=1], [wxrc=0]) +dnl --------------------------------------------------------------------------- + +dnl +dnl wxrc program from the wx-config script +dnl +AC_DEFUN([WXRC_CHECK], +[ + AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) + + if test "x$WX_CONFIG_NAME" = x; then + AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) + else + + AC_MSG_CHECKING([for wxrc]) + + if test "x$WXRC" = x ; then + dnl wx-config --utility is a new addition to wxWidgets: + _WX_PRIVATE_CHECK_VERSION(2,5,3) + if test -n "$wx_ver_ok"; then + WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` + fi + fi + + if test "x$WXRC" = x ; then + AC_MSG_RESULT([not found]) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT([$WXRC]) + ifelse([$1], , :, [$1]) + fi + + AC_SUBST(WXRC) + fi +]) + +dnl --------------------------------------------------------------------------- +dnl WX_LIKE_LIBNAME([output-var] [prefix], [name]) +dnl +dnl Sets the "output-var" variable to the name of a library named with same +dnl wxWidgets rule. +dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets +dnl the $lib variable to: +dnl 'mine_gtk2ud_test-2.8' +dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28 +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_LIKE_LIBNAME], + [ + wx_temp="$2""_""$WX_PORT" + + dnl add the [u][d] string + if test "$WX_UNICODE" = "1"; then + wx_temp="$wx_temp""u" + fi + if test "$WX_DEBUG" = "1"; then + wx_temp="$wx_temp""d" + fi + + dnl complete the name of the lib + wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR" + + dnl save it in the user's variable + $1=$wx_temp + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO +dnl +dnl Two little custom macros which define the ENABLE/WITH configure arguments. +dnl Macro arguments: +dnl $1 = the name of the --enable / --with feature +dnl $2 = the name of the variable associated +dnl $3 = the description of that feature +dnl $4 = the default value for that feature +dnl $5 = additional action to do in case option is given with "yes" value +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO], + [AC_ARG_ENABLE($1, + AC_HELP_STRING([--enable-$1], [$3 (default is $4)]), + [], [enableval="$4"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --enable-$1 option]) + if test "$enableval" = "yes" ; then + AC_MSG_RESULT([yes]) + $2=1 + $5 + elif test "$enableval" = "no" ; then + AC_MSG_RESULT([no]) + $2=0 + elif test "$enableval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + $2="auto" + else + AC_MSG_ERROR([ + Unrecognized option value (allowed values: yes, no, auto) + ]) + fi + ]) + +AC_DEFUN([WX_ARG_WITH_YESNOAUTO], + [AC_ARG_WITH($1, + AC_HELP_STRING([--with-$1], [$3 (default is $4)]), + [], [withval="$4"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --with-$1 option]) + if test "$withval" = "yes" ; then + AC_MSG_RESULT([yes]) + $2=1 + $5 + dnl NB: by default we don't allow --with-$1=no option + dnl since it does not make much sense ! + elif test "$6" = "1" -a "$withval" = "no" ; then + AC_MSG_RESULT([no]) + $2=0 + elif test "$withval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + $2="auto" + else + AC_MSG_ERROR([ + Unrecognized option value (allowed values: yes, auto) + ]) + fi + ]) + + +dnl --------------------------------------------------------------------------- +dnl WX_STANDARD_OPTIONS([options-to-add]) +dnl +dnl Adds to the configure script one or more of the following options: +dnl --enable-[debug|unicode|shared|wxshared|wxdebug] +dnl --with-[gtk|msw|motif|x11|mac|mgl|dfb] +dnl --with-wxversion +dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED, +dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values. +dnl +dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the +dnl --enable-unicode option (in boolean format) while the second indicates +dnl if wxWidgets was built in Unicode mode (and still is in boolean format). +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_STANDARD_OPTIONS], + [ + + dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if + dnl the $1 argument contains respectively the debug,unicode or shared options. + + dnl be careful here not to set debug flag if only "wxdebug" was specified + ifelse(regexp([$1], [\bdebug]), [-1],, + [WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])]) + + ifelse(index([$1], [unicode]), [-1],, + [WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])]) + + ifelse(regexp([$1], [\bshared]), [-1],, + [WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])]) + + dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option + dnl which must be able to accept the auto|gtk1|gtk2|msw|... values + ifelse(index([$1], [toolkit]), [-1],, + [ + AC_ARG_WITH([toolkit], + AC_HELP_STRING([--with-toolkit], + [Build against a specific wxWidgets toolkit (default is auto)]), + [], [withval="auto"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --with-toolkit option]) + if test "$withval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + TOOLKIT="auto" + else + TOOLKIT="$withval" + + dnl PORT must be one of the allowed values + if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ + "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ + "$TOOLKIT" != "x11" -a "$TOOLKIT" != "mac" -a \ + "$TOOLKIT" != "mgl" -a "$TOOLKIT" != "dfb" ; then + AC_MSG_ERROR([ + Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, x11, mac, mgl, dfb) + ]) + fi + + AC_MSG_RESULT([$TOOLKIT]) + fi + ]) + + dnl ****** IMPORTANT ******* + dnl Unlike for the UNICODE setting, you can build your program in + dnl shared mode against a static build of wxWidgets. Thus we have the + dnl following option which allows these mixtures. E.g. + dnl + dnl ./configure --disable-shared --with-wxshared + dnl + dnl will build your library in static mode against the first available + dnl shared build of wxWidgets. + dnl + dnl Note that's not possible to do the viceversa: + dnl + dnl ./configure --enable-shared --without-wxshared + dnl + dnl Doing so you would try to build your library in shared mode against a static + dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) ! + dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES + dnl (where we know what 'auto' should be expanded to). + dnl + dnl If you try to build something in ANSI mode against a UNICODE build + dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets, + dnl then at best you'll get ton of linking errors ! + dnl ************************ + + ifelse(index([$1], [wxshared]), [-1],, + [ + WX_ARG_WITH_YESNOAUTO( + [wxshared], [WX_SHARED], + [Force building against a shared build of wxWidgets, even if --disable-shared is given], + [auto], [], [1]) + ]) + + dnl Just like for SHARED and WX_SHARED it may happen that some adventurous + dnl peoples will want to mix a wxWidgets release build with a debug build of + dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables. + ifelse(index([$1], [wxdebug]), [-1],, + [ + WX_ARG_WITH_YESNOAUTO( + [wxdebug], [WX_DEBUG], + [Force building against a debug build of wxWidgets, even if --disable-debug is given], + [auto], [], [1]) + ]) + + dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option + dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values + ifelse(index([$1], [wxversion]), [-1],, + [ + AC_ARG_WITH([wxversion], + AC_HELP_STRING([--with-wxversion], + [Build against a specific version of wxWidgets (default is auto)]), + [], [withval="auto"]) + + dnl Show a message to the user about this option + AC_MSG_CHECKING([for the --with-wxversion option]) + if test "$withval" = "auto" ; then + AC_MSG_RESULT([will be automatically detected]) + WX_RELEASE="auto" + else + + wx_requested_major_version=`echo $withval | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'` + wx_requested_minor_version=`echo $withval | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'` + + dnl both vars above must be exactly 1 digit + if test "${#wx_requested_major_version}" != "1" -o \ + "${#wx_requested_minor_version}" != "1" ; then + AC_MSG_ERROR([ + Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0) + ]) + fi + + WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version" + AC_MSG_RESULT([$WX_RELEASE]) + fi + ]) + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG" + echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE" + echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED" + echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT" + echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE" + fi + ]) + + +dnl --------------------------------------------------------------------------- +dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS +dnl +dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values +dnl which are different from "auto". +dnl Thus this macro needs to be called only once all options have been set. +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], + [ + if test "$WX_SHARED" = "1" ; then + WXCONFIG_FLAGS="--static=no " + elif test "$WX_SHARED" = "0" ; then + WXCONFIG_FLAGS="--static=yes " + fi + + if test "$WX_DEBUG" = "1" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes " + elif test "$WX_DEBUG" = "0" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no " + fi + + dnl The user should have set WX_UNICODE=UNICODE + if test "$WX_UNICODE" = "1" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes " + elif test "$WX_UNICODE" = "0" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no " + fi + + if test "$TOOLKIT" != "auto" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT " + fi + + if test "$WX_RELEASE" != "auto" ; then + WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE " + fi + + dnl strip out the last space of the string + WXCONFIG_FLAGS=${WXCONFIG_FLAGS% } + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS" + fi + ]) + + +dnl --------------------------------------------------------------------------- +dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] +dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets +dnl additional CPP flags and put the result of the search in WX_$RESULTVAR +dnl also adding the "yes" or "no" message result to MSG. +dnl --------------------------------------------------------------------------- +AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], + [ + if test "$$1" = "auto" ; then + + dnl The user does not have particular preferences for this option; + dnl so we will detect the wxWidgets relative build setting and use it + AC_MSG_CHECKING([$3]) + + dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 + dnl string or to 0 otherwise. + dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it + dnl doesn't work; we use 'expr STRING : REGEXP' instead + WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*") + + if test "$WX_$1" != "0"; then + WX_$1=1 + AC_MSG_RESULT([yes]) + ifelse([$4], , :, [$4]) + else + WX_$1=0 + AC_MSG_RESULT([no]) + ifelse([$5], , :, [$5]) + fi + else + + dnl Use the setting given by the user + WX_$1=$$1 + fi + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_DETECT_STANDARD_OPTION_VALUES +dnl +dnl Detects the values of the following variables: +dnl 1) WX_RELEASE +dnl 2) WX_UNICODE +dnl 3) WX_DEBUG +dnl 4) WX_SHARED (and also WX_STATIC) +dnl 5) WX_PORT +dnl from the previously selected wxWidgets build; this macro in fact must be +dnl called *after* calling the WX_CONFIG_CHECK macro. +dnl +dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set +dnl by WX_CONFIG_CHECK macro +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], + [ + dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits, + dnl while WX_RELEASE only the major.minor ones. + WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR" + if test $WX_RELEASE -lt 26 ; then + + AC_MSG_ERROR([ + Cannot detect the wxWidgets configuration for the selected wxWidgets build + since its version is $WX_VERSION < 2.6.0; please install a newer + version of wxWidgets. + ]) + fi + + dnl The wx-config we are using understands the "--selected_config" + dnl option which returns an easy-parseable string ! + WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config) + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] Using wx-config --selected-config" + echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG" + fi + + + dnl we could test directly for WX_SHARED with a line like: + dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared], + dnl [if wxWidgets was built in SHARED mode]) + dnl but wx-config --selected-config DOES NOT outputs the 'shared' + dnl word when wx was built in shared mode; it rather outputs the + dnl 'static' word when built in static mode. + if test $WX_SHARED = "1"; then + STATIC=0 + elif test $WX_SHARED = "0"; then + STATIC=1 + elif test $WX_SHARED = "auto"; then + STATIC="auto" + fi + + dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables + _WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode], + [if wxWidgets was built with UNICODE enabled]) + _WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug], + [if wxWidgets was built in DEBUG mode]) + _WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static], + [if wxWidgets was built in STATIC mode]) + + dnl init WX_SHARED from WX_STATIC + if test "$WX_STATIC" != "0"; then + WX_SHARED=0 + else + WX_SHARED=1 + fi + + AC_SUBST(WX_UNICODE) + AC_SUBST(WX_DEBUG) + AC_SUBST(WX_SHARED) + + dnl detect the WX_PORT to use + if test "$TOOLKIT" = "auto" ; then + + dnl The user does not have particular preferences for this option; + dnl so we will detect the wxWidgets relative build setting and use it + AC_MSG_CHECKING([which wxWidgets toolkit was selected]) + + WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") + WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") + WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") + WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") + WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") + WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") + WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") + WX_MGLPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mgl.*") + WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") + + WX_PORT="unknown" + if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi + if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi + if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi + if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi + if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi + if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi + if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi + if test "$WX_MGLPORT" != "0"; then WX_PORT="mgl"; fi + if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi + + dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac + dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) + WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") + if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi + + dnl check at least one of the WX_*PORT has been set ! + + if test "$WX_PORT" = "unknown" ; then + AC_MSG_ERROR([ + Cannot detect the currently installed wxWidgets port ! + Please check your 'wx-config --cxxflags'... + ]) + fi + + AC_MSG_RESULT([$WX_PORT]) + else + + dnl Use the setting given by the user + if test -z "$TOOLKIT" ; then + WX_PORT=$TOOLKIT + else + dnl try with PORT + WX_PORT=$PORT + fi + fi + + AC_SUBST(WX_PORT) + + if test "$WX_DEBUG_CONFIGURE" = "1"; then + echo "[[dbg]] Values of all WX_* options after final detection:" + echo "[[dbg]] WX_DEBUG: $WX_DEBUG" + echo "[[dbg]] WX_UNICODE: $WX_UNICODE" + echo "[[dbg]] WX_SHARED: $WX_SHARED" + echo "[[dbg]] WX_RELEASE: $WX_RELEASE" + echo "[[dbg]] WX_PORT: $WX_PORT" + fi + + dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when + dnl the user gives the options: + dnl ./configure --enable-shared --without-wxshared + dnl or just do + dnl ./configure --enable-shared + dnl but there is only a static build of wxWidgets available. + if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then + AC_MSG_ERROR([ + Cannot build shared library against a static build of wxWidgets ! + This error happens because the wxWidgets build which was selected + has been detected as static while you asked to build $PACKAGE_NAME + as shared library and this is not possible. + Use the '--disable-shared' option to build $PACKAGE_NAME + as static library or '--with-wxshared' to use wxWidgets as shared library. + ]) + fi + + dnl now we can finally update the DEBUG,UNICODE,SHARED options + dnl to their final values if they were set to 'auto' + if test "$DEBUG" = "auto"; then + DEBUG=$WX_DEBUG + fi + if test "$UNICODE" = "auto"; then + UNICODE=$WX_UNICODE + fi + if test "$SHARED" = "auto"; then + SHARED=$WX_SHARED + fi + if test "$TOOLKIT" = "auto"; then + TOOLKIT=$WX_PORT + fi + + dnl in case the user needs a BUILD=debug/release var... + if test "$DEBUG" = "1"; then + BUILD="debug" + elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then + BUILD="release" + fi + + dnl respect the DEBUG variable adding the optimize/debug flags + dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we + dnl don't need to set them, too + if test "$DEBUG" = "1"; then + CXXFLAGS="$CXXFLAGS -g -O0" + CFLAGS="$CFLAGS -g -O0" + else + CXXFLAGS="$CXXFLAGS -O2" + CFLAGS="$CFLAGS -O2" + fi + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for], +dnl [what to print when var is 1], +dnl [what to print when var is 0]) +dnl +dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0. +dnl This macro mainly exists just to make configure.ac scripts more readable. +dnl +dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments +dnl if you want that m4 avoid to throw away the spaces prefixed to the +dnl argument value. +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_BOOLOPT_SUMMARY], + [ + if test "x$$1" = "x1" ; then + echo $2 + elif test "x$$1" = "x0" ; then + echo $3 + else + echo "$1 is $$1" + fi + ]) + +dnl --------------------------------------------------------------------------- +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG +dnl +dnl Shows a summary message to the user about the WX_* variable contents. +dnl This macro is used typically at the end of the configure script. +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG], + [ + echo + echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION" + echo " has the following settings:" + WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"]) + WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) + WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"]) + echo " - VERSION: $WX_VERSION" + echo " - PORT: $WX_PORT" + ]) + + +dnl --------------------------------------------------------------------------- +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END +dnl +dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info +dnl about the configuration of the package which used the wxpresets. +dnl +dnl Typical usage: +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN +dnl echo " - Package setting 1: $SETTING1" +dnl echo " - Package setting 2: $SETTING1" +dnl ... +dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END +dnl +dnl --------------------------------------------------------------------------- +AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN], + [ + echo + echo " ----------------------------------------------------------------" + echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed." + echo " Summary of main configuration settings for $PACKAGE_NAME:" + WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"]) + WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) + WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"]) + ]) + +AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END], + [ + WX_STANDARD_OPTIONS_SUMMARY_MSG + echo + echo " Now, just run make." + echo " ----------------------------------------------------------------" + echo + ]) + + +dnl --------------------------------------------------------------------------- +dnl Deprecated macro wrappers +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS]) +AC_DEFUN([AM_PATH_WXCONFIG], [ + WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5]) +]) +AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.2], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.2])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 12 + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +#serial 5 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 1 + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/aorta.cpp b/aorta.cpp new file mode 100644 index 0000000..77aba04 --- /dev/null +++ b/aorta.cpp @@ -0,0 +1,824 @@ +/* + + aorta.cpp: the Aleph One Replacement Texture Utility + Copyright (C) 2006 Gregory Smith + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +*/ +#include "aorta.h" +#include "DDSOptionsDialog.h" +#include "imagdds.h" + +IMPLEMENT_APP(MainApp) + +bool MainApp::OnInit() +{ + ::wxInitAllImageHandlers(); + wxDDSHandler *ddsHandler = new wxDDSHandler; + wxImage::AddHandler(ddsHandler); + MainWin = new MainFrame(_("Aorta"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE & ~ (wxRESIZE_BORDER | wxRESIZE_BOX | wxMAXIMIZE_BOX)); + MainWin->Show(TRUE); + SetTopWindow(MainWin); + + if (argc > 1) + MainWin->LoadNormal(argv[1]); + + return TRUE; +} + +#ifdef __WXMAC__ +void MainApp::MacOpenFile(const wxString &fileName) +{ + MainWin->LoadNormal(fileName); +} + +#endif + +MainFrame::MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size, long style) + : wxFrame((wxFrame *) NULL, -1, title, pos, size, style) +{ + fileMenu = new wxMenu; + fileMenu->Append(wxID_ABOUT, _T("&About Aorta...")); + fileMenu->AppendSeparator(); + fileMenu->Append(MENU_LoadNormal, _T("L&oad image...")); + fileMenu->Append(MENU_SaveAs, wxT("&Save as...")); + fileMenu->Append(wxID_EXIT, wxT("&Quit")); + + menuBar = new wxMenuBar; + menuBar->Append(fileMenu, wxT("&File")); + SetMenuBar(menuBar); + + wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL); + notebook = new wxNotebook(this, -1); + + basicPage = new BasicPage(notebook, -1, wxDefaultPosition, wxDefaultSize); + notebook->AddPage(basicPage, wxT("Compose"), true); + + batchPage = new BatchPage(notebook, -1, wxDefaultPosition, wxDefaultSize); + notebook->AddPage(batchPage, wxT("Batch Convert"), false); + +#ifdef __WIN32__ + topsizer->Add(notebook, 1, wxEXPAND); +#else + topsizer->Add(notebook, 1, wxEXPAND | wxALL, 10); +#endif + + SetAutoLayout(TRUE); + SetSizer(topsizer); + topsizer->Fit(this); + topsizer->SetSizeHints(this); +} + +void MainFrame::OnExit(wxCommandEvent& event) +{ + Close(TRUE); +} + +void MainFrame::OnAbout(wxCommandEvent& event) +{ + wxMessageBox(wxT("Aorta 2.1 (the Aleph One Replacement Texture Accessory)\n(C) 2006-2008 Gregory Smith\n\nAorta is licensed under the GPL. See COPYING.txt"), wxT("About Aorta"), wxOK); +} + +void MainFrame::OnLoadNormal(wxCommandEvent& event) +{ + basicPage->OnLoadNormal(event); +} + +void MainFrame::OnSaveAs(wxCommandEvent& event) +{ + basicPage->OnSaveAs(event); +} + +void MainFrame::OnLoadMask(wxCommandEvent& event) +{ + basicPage->OnLoadMask(event); +} + +void MainFrame::LoadNormal(const wxString& path) +{ + notebook->SetSelection(0); + basicPage->LoadNormal(path); +} + +BasicPage::BasicPage(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size) + : wxPanel(parent, id, pos, size) +{ + wxBoxSizer *pageSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *column[2]; + column[0] = new wxBoxSizer(wxVERTICAL); + + wxImageExt whiteImage(256, 256); + whiteImage.White(); + + normalImageStatic = new wxStaticBitmap(this, -1, wxBitmap(whiteImage)); +#ifdef wxUSE_DRAG_AND_DROP + normalImageStatic->SetDropTarget(new DnDNormalImage(this)); +#endif + column[0]->Add(normalImageStatic, 0, wxALIGN_CENTER | wxEXPAND | wxALL, 10); + normalImageFilename = new wxStaticText(this, -1, wxT("")); + column[0]->Add(normalImageFilename, 0, wxALIGN_CENTER | wxEXPAND | wxLEFT | wxRIGHT, 10); + normalImageSize = new wxStaticText(this, -1, wxT("")); + column[0]->Add(normalImageSize, 0, wxALIGN_CENTER | wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 10); + normalImageButton = new wxButton(this, BUTTON_NormalImage, wxT("Load normal...")); + column[0]->Add(normalImageButton, 0, wxALIGN_CENTER | wxALL, 10); + + unpremultiplyAlpha = new wxButton(this, BUTTON_UnpremultiplyAlpha, wxT("Un-Premultiply Alpha")); + column[0]->Add(unpremultiplyAlpha, 0, wxALIGN_CENTER | wxALL, 10); + + normalMap = new wxButton(this, BUTTON_MakeNormalMap, wxT("Make Normal Map")); + column[0]->Add(normalMap, 0, wxALIGN_CENTER | wxALL, 10); + + pageSizer->Add(column[0], 0, wxEXPAND | wxALL, 10); + + column[1] = new wxBoxSizer(wxVERTICAL); + + maskImageStatic = new wxStaticBitmap(this, -1, wxBitmap(whiteImage)); +#ifdef wxUSE_DRAG_AND_DROP + maskImageStatic->SetDropTarget(new DnDMask(this)); +#endif + column[1]->Add(maskImageStatic, 0, wxALIGN_CENTER | wxEXPAND | wxALL, 10); + + maskStatus = new wxStaticText(this, -1, wxT("")); + column[1]->Add(maskStatus, 0, wxALIGN_CENTER | wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 10); + column[1]->AddSpacer(maskStatus->GetRect().GetHeight()); + + wxBoxSizer *loadClearSizer = new wxBoxSizer(wxHORIZONTAL); + maskImageButton = new wxButton(this, BUTTON_MaskImage, wxT("Load mask...")); + loadClearSizer->Add(maskImageButton, 1, wxEXPAND | wxRIGHT, 10); + clearMaskButton = new wxButton(this, BUTTON_ClearMask, wxT("Clear mask")); + loadClearSizer->Add(clearMaskButton, 1, wxEXPAND | wxLEFT, 10); + column[1]->Add(loadClearSizer, 0, wxEXPAND | wxALIGN_CENTER | wxALL, 10); + + wxBoxSizer *opacTypeSizer = new wxBoxSizer(wxHORIZONTAL); + opacTypeTwo = new wxButton(this, BUTTON_OpacTypeTwo, wxT("Opac_type=2")); + opacTypeThree = new wxButton(this, BUTTON_OpacTypeThree, wxT("Opac_type=3")); + opacTypeSizer->Add(opacTypeTwo, 1, wxEXPAND | wxRIGHT, 10); + opacTypeSizer->Add(opacTypeThree, 1, wxEXPAND | wxLEFT, 10); + column[1]->Add(opacTypeSizer, 0, wxEXPAND | wxALIGN_CENTER | wxALL, 10); + SetMaskButtonEnablement(false); + + wxBoxSizer *saveSizer = new wxBoxSizer(wxHORIZONTAL); + saveAsButton = new wxButton(this, BUTTON_SaveAs, wxT("Save as...")); + saveAsButton->Disable(); + saveSizer->AddStretchSpacer(1); + saveSizer->Add(saveAsButton, 1, wxEXPAND | wxLEFT, 10); + column[1]->Add(saveSizer, 0, wxEXPAND | wxALIGN_CENTER | wxALL, 10); + + pageSizer->Add(column[1], 0, wxEXPAND | wxTOP | wxBOTTOM, 10); + + SetAutoLayout(TRUE); + SetSizer(pageSizer); + pageSizer->Fit(this); + pageSizer->SetSizeHints(this); + Layout(); +} + +void BasicPage::OnLoadNormal(wxCommandEvent &) +{ + wxConfig config; + wxString Directory; + config.Read(wxT("Single/DefaultDirectory/Load"), &Directory, wxT("")); + wxFileDialog *openFileDialog = new wxFileDialog( this, + wxT("Choose Image"), + Directory, + wxT(""), + wxT("Image Files ") + wxImage::GetImageExtWildcard() + wxT("|All Files|*.*"), + wxOPEN | wxCHANGE_DIR, + wxDefaultPosition); + if (openFileDialog->ShowModal() == wxID_OK) + { + LoadNormal(openFileDialog->GetPath()); + } +} + + +void BasicPage::OnLoadMask(wxCommandEvent &) +{ + + wxConfig config; + wxString Directory; + config.Read(wxT("Single/DefaultDirectory/Load"), &Directory, wxT("")); + wxFileDialog *openFileDialog = new wxFileDialog(this, + wxT("Choose Mask"), + wxT(""), + wxT(""), + wxT("Image Files ") + wxImage::GetImageExtWildcard(), + wxOPEN | wxCHANGE_DIR, + wxDefaultPosition); + if (openFileDialog->ShowModal() == wxID_OK) + { + LoadMask(openFileDialog->GetPath()); + } +} + +void BasicPage::OnClearMask(wxCommandEvent &) +{ + maskImage.Destroy(); + UpdateMaskDisplay(); +} + +void BasicPage::OnOpacTypeTwo(wxCommandEvent &) +{ + maskImage = normalImage; + maskImage.MakeOpacTypeTwo(); + UpdateMaskDisplay(); +} + +void BasicPage::OnOpacTypeThree(wxCommandEvent &) +{ + maskImage = normalImage; + maskImage.MakeOpacTypeThree(); + UpdateMaskDisplay(); +} + +void BasicPage::OnUnpremultiplyAlpha(wxCommandEvent &) +{ + normalImage.UnpremultiplyAlpha(); + UpdateNormalDisplay(); +} + +void BasicPage::OnMakeNormalMap(wxCommandEvent&) +{ + normalImage.MakeOpacTypeTwo(); + maskImage = normalImage; + normalImage.MakeNormalMap(); + UpdateNormalDisplay(); + UpdateMaskDisplay(); +} + +void BasicPage::OnSaveAs(wxCommandEvent &) +{ + if (!normalImage.Ok()) return; + + wxFileDialog *saveFileDialog; + { + wxConfig config; + wxString Directory; + config.Read(wxT("Single/DefaultDirectory/Save"), &Directory, wxT("")); + saveFileDialog = new wxFileDialog(this, + wxT("Save As"), + Directory, + (normalImageFilename->GetLabel().BeforeLast('.') + wxT(".dds")), + wxT("DDS files (*.dds)|*.dds|PNG files (*.png)|*.png"), + wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR, + wxDefaultPosition); + if (saveFileDialog->ShowModal() != wxID_OK) return; + + Directory = saveFileDialog->GetPath().BeforeLast(wxFileName::GetPathSeparator()); + config.Write(wxT("Single/DefaultDirectory/Save"), Directory); + } + + wxImageExt saveImage = normalImage; + if (maskImage.Ok()) + { + maskImage.ToAlpha(saveImage); +// saveImage.PrepareForMipmaps(); + } + else + { + if (saveImage.HasAlpha()) + { + exit(0); + } + } + + if (saveFileDialog->GetFilename().AfterLast('.').MakeLower() == wxT("png")) { + saveImage.SaveFile(saveFileDialog->GetPath(), wxBITMAP_TYPE_PNG); + } else { + // query for a preset + DDSOptionsDialog ddsOptions(wxT("Single"), saveImage.HasAlpha()); + if (ddsOptions.ShowModal() != wxID_OK) return; + + if (ddsOptions.generateMipmaps->GetValue()) { + saveImage.SetOption(wxIMAGE_OPTION_DDS_USE_MIPMAPS, 1); + + if (ddsOptions.repeatingTexture->GetValue()) { + saveImage.SetOption(wxIMAGE_OPTION_DDS_MIPMAP_WRAP_MODE, wxIMAGE_OPTION_DDS_WRAP_REPEAT); + } else { + saveImage.SetOption(wxIMAGE_OPTION_DDS_MIPMAP_WRAP_MODE, wxIMAGE_OPTION_DDS_WRAP_CLAMP); + } + + saveImage.SetOption(wxIMAGE_OPTION_DDS_MIPMAP_FILTER, ddsOptions.mipmapFilterChoice->GetSelection()); + saveImage.SetOption(wxIMAGE_OPTION_DDS_PREMULTIPLY_ALPHA, 0); + + if (saveImage.HasAlpha() && ddsOptions.colorFillBackground->GetValue()) { + if (ddsOptions.reconstructColors->GetValue()) { + saveImage.ReconstructColors(ddsOptions.backgroundColor); + } + + saveImage.PrepareForMipmaps(); + } + + } else { + saveImage.SetOption(wxIMAGE_OPTION_DDS_USE_MIPMAPS, 0); + } + + if (ddsOptions.useDXTC->GetValue()) { + saveImage.SetOption(wxIMAGE_OPTION_DDS_COMPRESS, 1); + } else { + saveImage.SetOption(wxIMAGE_OPTION_DDS_COMPRESS, 0); + } + + saveImage.SaveFile(saveFileDialog->GetPath(), wxDDSHandler::wxBITMAP_TYPE_DDS); + } +} + +void BasicPage::LoadNormal(const wxString& path) +{ + wxConfig config; + config.Write(wxT("Single/DefaultDirectory/Load"), path.BeforeLast('/')); + + normalImage.LoadFile(path); + if (normalImage.Ok()) + { + if (normalImage.HasMask()) normalImage.MaskToAlpha(); + + if (normalImage.HasAlpha()) + { + // convert the mask to grayscale for display + maskImage.FromAlpha(normalImage); + normalImage.RemoveAlpha(); + } + else + { + maskImage.Destroy(); + } + + normalImageFilename->SetLabel(path.AfterLast('/')); + wxString dimensionsString; + dimensionsString.Printf(wxT("%ix%i"), normalImage.GetWidth(), normalImage.GetHeight()); + normalImageSize->SetLabel(dimensionsString); + UpdateNormalDisplay(); + UpdateMaskDisplay(); + } + else + { + normalImage.Destroy(); + maskImage.Destroy(); + UpdateNormalDisplay(); + UpdateMaskDisplay(); + } +} + +void BasicPage::LoadMask(const wxString& path) +{ + wxConfig config; + config.Write(wxT("Single/DefaultDirectory/Load"), path.BeforeLast('/')); + + maskImage.LoadFile(path); + if (maskImage.Ok()) + { + if (maskImage.GetWidth() == normalImage.GetWidth() && maskImage.GetHeight() == normalImage.GetHeight()) + { + maskImage.MakeOpacTypeTwo(); + } + else + { + wxMessageBox(wxT("The mask must be the same width and height as the image."), wxT("Invalid mask"), wxOK); + maskImage.Destroy(); + } + } + else + { + maskImage.Destroy(); + } + UpdateMaskDisplay(); +} + +void BasicPage::SetMaskButtonEnablement(bool enabled) +{ + if (enabled) + { + maskImageButton->Enable(); + clearMaskButton->Enable(); + opacTypeTwo->Enable(); + opacTypeThree->Enable(); + } + else + { + maskImageButton->Disable(); + clearMaskButton->Disable(); + opacTypeTwo->Disable(); + opacTypeThree->Disable(); + } +} + +void BasicPage::UpdateNormalDisplay() +{ + + int width, height; + normalImageStatic->GetSize(&width, &height); + + if (normalImage.Ok()) + { + wxImageExt normalImageDisplay = normalImage; + normalImageDisplay.PropRescale(width, height); + normalImageStatic->SetBitmap(wxBitmap(normalImageDisplay)); + + saveAsButton->Enable(); + SetMaskButtonEnablement(true); + } + else + { + wxImageExt normalImageDisplay(width, height); + normalImageDisplay.White(); + normalImageStatic->SetBitmap(wxBitmap(normalImageDisplay)); + + saveAsButton->Disable(); + SetMaskButtonEnablement(false); + } +} + +void BasicPage::UpdateMaskDisplay() +{ + int width, height; + maskImageStatic->GetSize(&width, &height); + + wxImageExt maskImageDisplay; + if (maskImage.Ok()) + { + maskImageDisplay = maskImage; + maskStatus->SetLabel(wxT("")); + } + else if (normalImage.Ok()) + { + maskImageDisplay.Create(normalImage.GetWidth(), normalImage.GetHeight()); + maskImageDisplay.White(); + maskStatus->SetLabel(wxT("No mask")); + } + else + { + maskImageDisplay.Create(width, height); + maskImageDisplay.White(); + maskStatus->SetLabel(wxT("")); + } + maskImageDisplay.PropRescale(width, height); + maskImageStatic->SetBitmap(wxBitmap(maskImageDisplay)); + +} + +BatchPage::BatchPage(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size) + : wxPanel(parent, id, pos, size) +{ + wxConfig config; + chooseFiles = new wxButton(this, BUTTON_ChooseFiles, wxT("Choose Source...")); + recurseCheckbox = new wxCheckBox(this, CHECKBOX_Recurse, wxT("Traverse (and recreate) subfolders")); + + config.Read(wxT("Batch/Source"), &source, wxT("")); + if (source == wxT("")) + fileStatus = new wxTextCtrl(this, -1, wxT("No files selected"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_BESTWRAP); + else + fileStatus = new wxTextCtrl(this, -1, source, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_BESTWRAP); + + findMasks = new wxCheckBox(this, BUTTON_FindMasks, wxT("Attempt to find masks")); + bool value; + config.Read(wxT("Batch/Recurse"), &value, true); + recurseCheckbox->SetValue(value ? 1 : 0); + config.Read(wxT("Batch/FindMasks"), &value, false); + findMasks->SetValue(value ? 1 : 0); + maskString = new wxTextCtrl(this, TEXT_MaskString); + wxString mask; + config.Read(wxT("Batch/MaskString"), &mask, wxT("^mask\\$")); + mask.Replace(wxT("\\$"), wxT("$")); + maskString->SetValue(mask); + + selectDestination = new wxButton(this, BUTTON_ChooseDestination, wxT("Choose Destination...")); + + config.Read(wxT("Batch/Destination"), &destination, wxT("")); + if (destination == wxT("")) + destinationStatus = new wxTextCtrl(this, -1, wxT("No destination chosen"), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_BESTWRAP); + else + destinationStatus = new wxTextCtrl(this, -1, destination, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY | wxTE_BESTWRAP); +// destinationStatus->Wrap(300); + + convert = new wxButton(this, BUTTON_Convert, wxT("Batch Convert...")); + + saveAsDDS = new wxRadioButton(this, -1, wxT("Save as DDS"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); + saveAsDDS->SetValue(1); + saveAsPNG = new wxRadioButton(this, -1, wxT("Save as PNG")); + + do_layout(); +} + +void BatchPage::do_layout() +{ + wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL); + //wxStaticBox *chooseFilesStaticBox = new wxStaticBox(this, -1, wxT("Drop Files to Choose Sources")); + //chooseFilesStaticBox->SetDropTarget(new DnDBatchFiles(this)); + //wxStaticBoxSizer* chooseFilesBox = new wxStaticBoxSizer(chooseFilesStaticBox, wxHORIZONTAL); + wxBoxSizer* chooseFilesBox = new wxBoxSizer(wxHORIZONTAL); + chooseFiles->SetDropTarget(new DnDBatchFiles(this)); + chooseFilesBox->Add(chooseFiles, 0, wxALL | wxALIGN_CENTER_VERTICAL | wxADJUST_MINSIZE, 10); + fileStatus->SetDropTarget(new DnDBatchFiles(this)); + chooseFilesBox->Add(fileStatus, 1, wxALL | wxALIGN_CENTER_VERTICAL | wxADJUST_MINSIZE, 10); + topSizer->Add(chooseFilesBox, 0, wxALL | wxEXPAND, 10); + wxBoxSizer* recurseBoxSizer = new wxBoxSizer(wxHORIZONTAL); + recurseBoxSizer->AddSpacer(10); + recurseBoxSizer->Add(recurseCheckbox, 0, wxEXPAND, 10); + topSizer->Add(recurseBoxSizer, 0, wxALL & ~wxTOP | wxEXPAND, 10); + topSizer->Add(new wxStaticLine(this), 0, wxEXPAND); + + //wxStaticBoxSizer* chooseMasksBox = new wxStaticBoxSizer(new wxStaticBox(this, -1, wxT("Choose Masks")), wxVERTICAL); + wxBoxSizer* chooseMasksBox = new wxBoxSizer(wxVERTICAL); + chooseMasksBox->Add(findMasks, 0, wxALL, 10); + chooseMasksBox->Add(maskString, 0, wxLEFT | wxRIGHT | wxEXPAND, 10); + wxStaticText *maskStringHelp = new wxStaticText(this, -1, wxT("Use ^ for file name and $ for extension; e.g. 1.png and ^A$ -> 1A.png")); + wxFont helpFont = maskStringHelp->GetFont(); + helpFont.SetStyle(wxFONTSTYLE_ITALIC); + maskStringHelp->SetFont(helpFont); + chooseMasksBox->Add(maskStringHelp, 0, wxALL, 10); + topSizer->Add(chooseMasksBox, 0, wxALL | wxEXPAND, 10); + topSizer->Add(new wxStaticLine(this), 0, wxEXPAND); + + //wxStaticBox *chooseDestinationStaticBox = new wxStaticBox(this, -1, wxT("Drop Folder to Choose Destination")); + //chooseDestinationStaticBox->SetDropTarget(new DnDBatchDestination(this)); + //wxStaticBoxSizer* chooseDestinationBox = new wxStaticBoxSizer(chooseDestinationStaticBox, wxHORIZONTAL); + wxBoxSizer *chooseDestinationBox = new wxBoxSizer(wxHORIZONTAL); + selectDestination->SetDropTarget(new DnDBatchDestination(this)); + chooseDestinationBox->Add(selectDestination, 0, wxALL | wxALIGN_CENTER_VERTICAL | wxADJUST_MINSIZE, 10); + destinationStatus->SetDropTarget(new DnDBatchDestination(this)); + chooseDestinationBox->Add(destinationStatus, 1, wxALL | wxALIGN_CENTER_VERTICAL | wxADJUST_MINSIZE, 10); + topSizer->Add(chooseDestinationBox, 0, wxALL | wxEXPAND, 10); + topSizer->Add(new wxStaticLine(this), 0, wxEXPAND); + wxBoxSizer *formatSizer = new wxBoxSizer(wxHORIZONTAL); + formatSizer->Add(saveAsDDS, 1, wxALL, 10); + formatSizer->AddSpacer(10); + formatSizer->Add(saveAsPNG, 1, wxALL, 10); + topSizer->Add(formatSizer, 0, wxALL, 10); + topSizer->Add(new wxStaticLine(this), 0, wxEXPAND); + topSizer->Add(convert, 0, wxALL, 20); + + SetAutoLayout(true); + SetSizer(topSizer); + topSizer->Fit(this); + topSizer->SetSizeHints(this); + Layout(); +} + +void BatchPage::OnChooseSource(wxCommandEvent &) +{ + wxDirDialog *openDirDialog = new wxDirDialog(this, + wxT("Choose a source folder")); + if (openDirDialog->ShowModal() == wxID_OK) + { + ChooseSource(openDirDialog->GetPath()); + } +} + +void BatchPage::ChooseSource(const wxString& folder) +{ + source = folder; + wxConfig config; + config.Write(wxT("Batch/Source"), source); +// fileStatus->SetLabel(folder); + fileStatus->SetValue(folder); +// fileStatus->Wrap(300); +} + +void BatchPage::OnChooseDestination(wxCommandEvent &) +{ + wxDirDialog *openDirDialog = new wxDirDialog(this, + wxT("Choose a destination folder")); + if (openDirDialog->ShowModal() == wxID_OK) + { + ChooseDestination(openDirDialog->GetPath()); + } + +} + +void BatchPage::ChooseDestination(const wxString& folder) +{ + destination = folder; + wxConfig config; + config.Write(wxT("Batch/Destination"), destination); + destinationStatus->SetValue(folder); +// destinationStatus->Wrap(300); +} + +void BatchPage::OnConvert(wxCommandEvent &) +{ + if (!wxDir::Exists(source)) return; + if (!wxDir::Exists(destination)) return; + + wxArrayString filesToConvert; + // build an array of files to convert + wxDir::GetAllFiles(source, &filesToConvert, wxT(""), wxDIR_FILES | (recurseCheckbox->GetValue() ? wxDIR_DIRS : 0)); + + // remove files beginning with . + wxArrayString filesWithDots = filesToConvert; + filesToConvert.Clear(); + for (int i = 0; i < filesWithDots.Count(); i++) + { + wxFileName filename = filesWithDots[i]; + if (!filename.IsOk()) continue; + if (filename.GetName()[0] == '.') continue; + filesToConvert.Add(filename.GetFullPath()); + } + + + bool useMasks = findMasks->GetValue(); + bool toPNG = saveAsPNG->GetValue(); + + if (useMasks) + { + // for each file in this list, we need to remove the corresponding mask + wxArrayString listIncludingMasks = filesToConvert; + for (int i = 0; i < listIncludingMasks.Count(); i++) + { + wxFileName filename = listIncludingMasks[i]; + wxString mask = maskString->GetValue(); + mask.Replace(wxT("^"), filename.GetPath() + wxFileName::GetPathSeparator() + filename.GetName(), false); + if (filename.GetExt() != wxT("")) + mask.Replace(wxT("$"), (wxT(".") + filename.GetExt()), false); + else + mask.Replace(wxT("$"), wxT("")); + + int loc = filesToConvert.Index(mask); + if (loc != wxNOT_FOUND) + { + filesToConvert.RemoveAt(loc); + } + } + } + + // make all the files relative to the source + for (int i = 0; i < filesToConvert.Count(); i++) + { + wxFileName filename = filesToConvert[i]; + filename.MakeRelativeTo(source); + filesToConvert[i] = filename.GetFullPath(); + } + + // get the DDS options + DDSOptionsDialog ddsOptions(wxT("Batch"), true); + if (!toPNG) + if (ddsOptions.ShowModal() != wxID_OK) return; + + wxProgressDialog pd(wxT("Converting"), wxT("Converting"), filesToConvert.Count(), NULL, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_CAN_ABORT); + + for (int i = 0; i < filesToConvert.Count(); i++) + { + wxString progressString; + progressString.Printf(wxT("Converting...%i/%i"), i + 1, filesToConvert.Count()); + if (!pd.Update(i, progressString)) break; + wxImageExt normalImage; + wxImageExt maskImage; + + wxFileName normalFile = source + wxFileName::GetPathSeparator() + filesToConvert[i]; + wxString mask = maskString->GetValue(); + mask.Replace(wxT("^"), normalFile.GetPath() + wxFileName::GetPathSeparator() + normalFile.GetName(), false); + mask.Replace(wxT("$"), (wxT(".") + normalFile.GetExt()), false); + wxFileName maskFile = mask; + wxFileName saveFile; + if (recurseCheckbox->GetValue()) + { + saveFile = destination + wxFileName::GetPathSeparator() + wxFileName(filesToConvert[i]).GetPath() + wxFileName::GetPathSeparator() + wxFileName(filesToConvert[i]).GetName() + (toPNG ? wxT(".png") : wxT(".dds")); + wxFileName::Mkdir(saveFile.GetPath(), 0777, wxPATH_MKDIR_FULL); + } + else + { + saveFile = destination + wxFileName::GetPathSeparator() + wxFileName(filesToConvert[i]).GetName() + (toPNG ? wxT(".png") : wxT(".dds")); + } + + if (normalFile.GetName()[0] == '.') continue; + if (!normalImage.LoadFile(normalFile.GetFullPath())) continue; + if (!normalImage.Ok()) continue; + if (normalImage.HasMask()) + normalImage.MaskToAlpha(); + if (wxFileName::FileExists(maskFile.GetFullPath())) + { + maskImage.LoadFile(maskFile.GetFullPath()); + if (maskImage.Ok()) + { + if (maskImage.GetWidth() == normalImage.GetWidth() && maskImage.GetHeight() == normalImage.GetHeight()) + { + maskImage.MakeOpacTypeTwo(); + maskImage.ToAlpha(normalImage); + } + } + } + + if (toPNG) { + normalImage.SaveFile(saveFile.GetFullPath(), wxBITMAP_TYPE_PNG); + } else { + // set the image options + if (ddsOptions.generateMipmaps->GetValue()) + { + normalImage.SetOption(wxIMAGE_OPTION_DDS_USE_MIPMAPS, 1); + if (ddsOptions.repeatingTexture->GetValue()) { + normalImage.SetOption(wxIMAGE_OPTION_DDS_MIPMAP_WRAP_MODE, wxIMAGE_OPTION_DDS_WRAP_REPEAT); + } else { + normalImage.SetOption(wxIMAGE_OPTION_DDS_MIPMAP_WRAP_MODE, wxIMAGE_OPTION_DDS_WRAP_CLAMP); + } + + normalImage.SetOption(wxIMAGE_OPTION_DDS_MIPMAP_FILTER, ddsOptions.mipmapFilterChoice->GetSelection()); + normalImage.SetOption(wxIMAGE_OPTION_DDS_PREMULTIPLY_ALPHA, 0); + + if (normalImage.HasAlpha() && ddsOptions.colorFillBackground->GetValue()) + { + if (ddsOptions.reconstructColors->GetValue()) + normalImage.ReconstructColors(ddsOptions.backgroundColor); + + normalImage.PrepareForMipmaps(); + } + } + else + { + normalImage.SetOption(wxIMAGE_OPTION_DDS_USE_MIPMAPS, 0); + } + + if (ddsOptions.useDXTC->GetValue()) + { + normalImage.SetOption(wxIMAGE_OPTION_DDS_COMPRESS, 1); + } + else + { + normalImage.SetOption(wxIMAGE_OPTION_DDS_COMPRESS, 0); + } + + normalImage.SaveFile(saveFile.GetFullPath(), wxDDSHandler::wxBITMAP_TYPE_DDS); + } + } +} + +void BatchPage::SaveFindMaskConfig(wxCommandEvent &) +{ + wxConfig config; + config.Write(wxT("Batch/FindMasks"), findMasks->GetValue() == 1); + wxString mask = maskString->GetValue(); + mask.Replace(wxT("$"), wxT("\\$")); + config.Write(wxT("Batch/MaskString"), mask); +} + +void BatchPage::SaveRecurseConfig(wxCommandEvent &) +{ + wxConfig config; + config.Write(wxT("Batch/Recurse"), recurseCheckbox->GetValue() == 1); +} + +#if wxUSE_DRAG_AND_DROP + +bool DnDNormalImage::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames) +{ + if (filenames.GetCount() == 1 && wxFileName::FileExists(filenames[0])) + m_page->LoadNormal(filenames[0]); +} + +bool DnDMask::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames) +{ + if (filenames.GetCount() == 1 && wxFileName::FileExists(filenames[0])) + m_page->LoadMask(filenames[0]); +} + +bool DnDBatchFiles::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames) +{ + if (filenames.GetCount() == 1 && wxFileName(filenames[0]).DirExists()) + m_page->ChooseSource(filenames[0]); +} + +bool DnDBatchDestination::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames) +{ + if (filenames.GetCount() == 1 && wxFileName(filenames[0]).DirExists()) + m_page->ChooseDestination(filenames[0]); +} +#endif + +BEGIN_EVENT_TABLE(MainFrame, wxFrame) +EVT_MENU(wxID_EXIT, MainFrame::OnExit) +EVT_MENU(wxID_ABOUT, MainFrame::OnAbout) +EVT_MENU(MENU_LoadNormal, MainFrame::OnLoadNormal) +EVT_MENU(MENU_SaveAs, MainFrame::OnSaveAs) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(BasicPage, wxPanel) +EVT_BUTTON(BUTTON_NormalImage, BasicPage::OnLoadNormal) +EVT_BUTTON(BUTTON_MaskImage, BasicPage::OnLoadMask) +EVT_BUTTON(BUTTON_ClearMask, BasicPage::OnClearMask) +EVT_BUTTON(BUTTON_OpacTypeTwo, BasicPage::OnOpacTypeTwo) +EVT_BUTTON(BUTTON_OpacTypeThree, BasicPage::OnOpacTypeThree) +EVT_BUTTON(BUTTON_SaveAs, BasicPage::OnSaveAs) +EVT_BUTTON(BUTTON_UnpremultiplyAlpha, BasicPage::OnUnpremultiplyAlpha) +EVT_BUTTON(BUTTON_MakeNormalMap, BasicPage::OnMakeNormalMap) +END_EVENT_TABLE() + +BEGIN_EVENT_TABLE(BatchPage, wxPanel) +EVT_BUTTON(BUTTON_ChooseFiles, BatchPage::OnChooseSource) +EVT_BUTTON(BUTTON_ChooseDestination, BatchPage::OnChooseDestination) +EVT_BUTTON(BUTTON_Convert, BatchPage::OnConvert) +EVT_BUTTON(BUTTON_FindMasks, BatchPage::SaveFindMaskConfig) +EVT_TEXT(TEXT_MaskString, BatchPage::SaveFindMaskConfig) +EVT_CHECKBOX(CHECKBOX_Recurse, BatchPage::SaveRecurseConfig) +END_EVENT_TABLE() diff --git a/aorta.h b/aorta.h new file mode 100644 index 0000000..1b80590 --- /dev/null +++ b/aorta.h @@ -0,0 +1,252 @@ +/* + + aorta.h: the Aleph One Replacement Texture Utility + Copyright (C) 2006 Gregory Smith + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + */ + +#ifndef AORTA_H +#define AORTA_H + +#include +#ifndef WX_PRECOMP +#include +#include +#include +#include +#include +#include +#ifdef wxUSE_DRAG_AND_DROP +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#endif + +#include "image_ext.h" + +class MainFrame; + +class MainApp: public wxApp // MainApp is the class for our application +{ + // MainApp just acts as a container for the window, +public: + // or frame in MainFrame + virtual bool OnInit(); +#ifdef __WXMAC__ + void MainApp::MacOpenFile(const wxString &fileName); +#endif +private: + MainFrame *MainWin; +}; + +class BasicPage; +class BatchPage; + +class MainFrame: public wxFrame // MainFrame is the class for our window, +{ + // It contains the window and all objects in it +public: + MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size, long style); + wxNotebook *notebook; + BasicPage *basicPage; + BatchPage *batchPage; + wxMenuBar *menuBar; + wxMenu *fileMenu; + void OnExit(wxCommandEvent& event); + void OnAbout(wxCommandEvent &); + void OnLoadNormal(wxCommandEvent &); + void OnLoadMask(wxCommandEvent &); + void OnSaveAs(wxCommandEvent &); + void LoadNormal(const wxString &); + + DECLARE_EVENT_TABLE() + +}; + +class BasicPage: public wxPanel +{ +public: + BasicPage(wxWindow* parent, wxWindowID id, const wxPoint &pos, const wxSize &size); + + void OnLoadNormal(wxCommandEvent &); + void OnLoadMask(wxCommandEvent &); + void OnClearMask(wxCommandEvent &); + void OnOpacTypeTwo(wxCommandEvent &); + void OnOpacTypeThree(wxCommandEvent &); + void OnSaveAs(wxCommandEvent &); + void OnUnpremultiplyAlpha(wxCommandEvent &); + void OnMakeNormalMap(wxCommandEvent &); + + void LoadNormal(const wxString& path); + void LoadMask(const wxString& path); + + void UpdateNormalDisplay(); + void UpdateMaskDisplay(); + + void SetMaskButtonEnablement(bool enabled); + + DECLARE_EVENT_TABLE() + +private: + wxImageExt normalImage; + wxImageExt normalImageDisplay; + wxButton *normalImageButton; + wxButton *unpremultiplyAlpha; + wxButton *normalMap; + wxStaticBitmap *normalImageStatic; + wxStaticText *normalImageSize; + wxStaticText *normalImageFilename; + + wxImageExt maskImage; + wxImageExt maskImageDisplay; + wxButton *maskImageButton; + wxButton *clearMaskButton; + wxButton *opacTypeTwo; + wxButton *opacTypeThree; + wxStaticBitmap *maskImageStatic; + wxStaticText *maskStatus; + + wxButton *saveAsButton; +}; + +class BatchPage : public wxPanel +{ +public: + BatchPage(wxWindow* parent, wxWindowID id, const wxPoint &pos, const wxSize &size); + + void OnChooseSource(wxCommandEvent &); + void OnChooseDestination(wxCommandEvent &); + + void ChooseSource(const wxString& files); + void ChooseDestination(const wxString &folder); + + void OnConvert(wxCommandEvent &); + + void SaveFindMaskConfig(wxCommandEvent &); + void SaveRecurseConfig(wxCommandEvent &); + + DECLARE_EVENT_TABLE() + +private: + void do_layout(); + + wxButton *chooseFiles; + wxTextCtrl *fileStatus; + wxCheckBox *recurseCheckbox; + + wxCheckBox *findMasks; + wxTextCtrl *maskString; + + wxButton *selectDestination; + wxTextCtrl *destinationStatus; + + wxRadioButton *saveAsDDS; + wxRadioButton *saveAsPNG; + + wxButton *convert; + + wxString source; + wxString destination; +}; + +#if wxUSE_DRAG_AND_DROP +class DnDNormalImage : public wxFileDropTarget +{ +public: + DnDNormalImage(BasicPage *page) { m_page = page; } + + virtual bool OnDropFiles(wxCoord x, wxCoord y, + const wxArrayString& filenames); + +private: + BasicPage *m_page; +}; + +class DnDMask : public wxFileDropTarget +{ +public: + DnDMask(BasicPage *page) { m_page = page; } + + virtual bool OnDropFiles(wxCoord x, wxCoord y, + const wxArrayString& filenames); +private: + BasicPage *m_page; +}; + +class DnDBatchFiles : public wxFileDropTarget +{ +public: + DnDBatchFiles(BatchPage *page) { m_page = page; } + + virtual bool OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames); +private: + BatchPage *m_page; +}; + +class DnDBatchDestination : public wxFileDropTarget +{ +public: + DnDBatchDestination(BatchPage *page) { m_page = page; } + + virtual bool OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames); +private: + BatchPage *m_page; +}; + + +#endif + +enum +{ + MENU_LoadNormal = wxID_HIGHEST + 1, + MENU_SaveAs, + BUTTON_NormalImage, + BUTTON_UnpremultiplyAlpha, + BUTTON_MakeNormalMap, + BUTTON_MaskImage, + BUTTON_ClearMask, + BUTTON_OpacTypeTwo, + BUTTON_OpacTypeThree, + BUTTON_SaveAs, + BUTTON_ChooseBackground, + BUTTON_NoHaloRemoval, + BUTTON_PremultiplyAlpha, + BUTTON_ColorFillBackground, + BUTTON_GenerateMipmaps, + BUTTON_ReconstructColors, + + BUTTON_ChooseFiles, + BUTTON_ChooseDestination, + BUTTON_Convert, + BUTTON_FindMasks, + CHECKBOX_Recurse, + TEXT_MaskString +}; + + + +#endif diff --git a/aorta.rc b/aorta.rc new file mode 100644 index 0000000..a29a463 --- /dev/null +++ b/aorta.rc @@ -0,0 +1 @@ +AppIcon ICON "Aorta.ico" diff --git a/autogen.sh b/autogen.sh new file mode 100644 index 0000000..4d4cb56 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. +# This was lifted from the Gimp, and adapted slightly by +# Raph Levien, slightly hacked for xine by Daniel Caujolle-Bert. + +DIE=0 + +PROG=alephone + +# Check how echo works in this /bin/sh +case `echo -n` in +-n) _echo_n= _echo_c='\c';; +*) _echo_n=-n _echo_c=;; +esac + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed to compile $PROG." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have automake installed to compile $PROG." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +(aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing aclocal. The version of automake" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if [ "$DIE" -eq 1 ]; then + exit 1 +fi + +rm -rf autom4te.cache + +aclocalinclude="$ACLOCAL_FLAGS"; \ +(echo $_echo_n " + Running aclocal: $_echo_c"; \ + aclocal $aclocalinclude; \ + echo "done.") && \ +(echo $_echo_n " + Running autoheader: $_echo_c"; \ + autoheader; \ + echo "done.") && \ +(echo $_echo_n " + Running automake: $_echo_c"; \ + automake --gnu --add-missing --copy; \ + echo "done.") && \ +(echo $_echo_n " + Running autoconf: $_echo_c"; \ + autoconf; \ + echo "done.") + +rm -f config.cache diff --git a/config.guess b/config.guess new file mode 100644 index 0000000..8152efd --- /dev/null +++ b/config.guess @@ -0,0 +1,1522 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. + +timestamp='2011-11-11' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo hexagon-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..2f8905e --- /dev/null +++ b/config.h.in @@ -0,0 +1,86 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the `floor' function. */ +#undef HAVE_FLOOR + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the `sqrt' function. */ +#undef HAVE_SQRT + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc diff --git a/config.status b/config.status new file mode 100644 index 0000000..b962365 --- /dev/null +++ b/config.status @@ -0,0 +1,1236 @@ +#! /bin/sh +# Generated by configure. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by Aorta $as_me 2.1, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" Makefile" +config_headers=" config.h" +config_commands=" depfiles" + +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +ac_cs_config="" +ac_cs_version="\ +Aorta config.status 2.1 +configured by ./configure, generated by GNU Autoconf 2.68, + with options \"$ac_cs_config\" + +Copyright (C) 2010 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='/home/logue/aorta' +srcdir='.' +INSTALL='/bin/install -c' +MKDIR_P='/bin/mkdir -p' +AWK='gawk' +test -n "$AWK" || AWK=awk +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +if $ac_cs_recheck; then + set X '/bin/sh' './configure' $ac_configure_extra_args --no-create --no-recursion + shift + $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6 + CONFIG_SHELL='/bin/sh' + export CONFIG_SHELL + exec "$@" +fi + +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +# +# INIT-COMMANDS +# +AMDEP_TRUE="" ac_aux_dir="." + + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && +S["am__EXEEXT_FALSE"]="#" +S["am__EXEEXT_TRUE"]="" +S["LTLIBOBJS"]="" +S["MAKE_WINDOWS_FALSE"]="" +S["MAKE_WINDOWS_TRUE"]="#" +S["WX_VERSION_MICRO"]="3" +S["WX_VERSION_MINOR"]="9" +S["WX_VERSION_MAJOR"]="2" +S["WX_RESCOMP"]="windres --include-dir /c/mingw32/include/wx-2.9 --define __WIN32__ --define __WIN95__ --define __GNUWIN32__ " +S["WX_VERSION"]="2.9.3" +S["WX_LIBS_STATIC"]="-L/c/mingw32/lib -Wl,--subsystem,windows -mwindows /c/mingw32/lib/libwx_mswu_xrc-2.9.a /c/mingw32/lib/libwx_mswu_webview-2.9.a /c/mingw32/lib/libw"\ +"x_mswu_qa-2.9.a /c/mingw32/lib/libwx_baseu_net-2.9.a /c/mingw32/lib/libwx_mswu_html-2.9.a /c/mingw32/lib/libwx_mswu_adv-2.9.a /c/mingw32/lib/libwx_m"\ +"swu_core-2.9.a /c/mingw32/lib/libwx_baseu_xml-2.9.a /c/mingw32/lib/libwx_baseu-2.9.a -lpng -ljpeg -ltiff -lexpat -lwxregexu-2.9 -lz -lrpcrt4 -loleau"\ +"t32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 " +S["WX_LIBS"]="-L/c/mingw32/lib -Wl,--subsystem,windows -mwindows /c/mingw32/lib/libwx_mswu_xrc-2.9.a /c/mingw32/lib/libwx_mswu_webview-2.9.a /c/mingw32/lib/libw"\ +"x_mswu_qa-2.9.a /c/mingw32/lib/libwx_baseu_net-2.9.a /c/mingw32/lib/libwx_mswu_html-2.9.a /c/mingw32/lib/libwx_mswu_adv-2.9.a /c/mingw32/lib/libwx_m"\ +"swu_core-2.9.a /c/mingw32/lib/libwx_baseu_xml-2.9.a /c/mingw32/lib/libwx_baseu-2.9.a -lpng -ljpeg -ltiff -lexpat -lwxregexu-2.9 -lz -lrpcrt4 -loleau"\ +"t32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 " +S["WX_CXXFLAGS_ONLY"]="-I/c/mingw32/lib/wx/include/msw-unicode-static-2.9 -I/c/mingw32/include/wx-2.9 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__" +S["WX_CFLAGS_ONLY"]="" +S["WX_CXXFLAGS"]="-I/c/mingw32/lib/wx/include/msw-unicode-static-2.9 -I/c/mingw32/include/wx-2.9 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__ " +S["WX_CFLAGS"]="-I/c/mingw32/lib/wx/include/msw-unicode-static-2.9 -I/c/mingw32/include/wx-2.9 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__ " +S["WX_CPPFLAGS"]="-I/c/mingw32/lib/wx/include/msw-unicode-static-2.9 -I/c/mingw32/include/wx-2.9 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__" +S["WX_CONFIG_PATH"]="/mingw/bin/wx-config" +S["LIBOBJS"]="" +S["EGREP"]="/bin/grep -E" +S["GREP"]="/bin/grep" +S["CXXCPP"]="g++ -E" +S["am__fastdepCXX_FALSE"]="#" +S["am__fastdepCXX_TRUE"]="" +S["CXXDEPMODE"]="depmode=gcc3" +S["ac_ct_CXX"]="g++" +S["CXXFLAGS"]="-g -O2 -I/c/mingw32/lib/wx/include/msw-unicode-static-2.9 -I/c/mingw32/include/wx-2.9 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__" +S["CXX"]="g++" +S["CPP"]="gcc -E" +S["am__fastdepCC_FALSE"]="#" +S["am__fastdepCC_TRUE"]="" +S["CCDEPMODE"]="depmode=gcc3" +S["am__nodep"]="_no" +S["AMDEPBACKSLASH"]="\\" +S["AMDEP_FALSE"]="#" +S["AMDEP_TRUE"]="" +S["am__quote"]="" +S["am__include"]="include" +S["DEPDIR"]=".deps" +S["OBJEXT"]="o" +S["EXEEXT"]=".exe" +S["ac_ct_CC"]="gcc" +S["CPPFLAGS"]=" -I/c/mingw32/lib/wx/include/msw-unicode-static-2.9 -I/c/mingw32/include/wx-2.9 -D_LARGEFILE_SOURCE=unknown -D__WXMSW__" +S["LDFLAGS"]="" +S["CFLAGS"]="-g -O2 " +S["CC"]="gcc" +S["am__untar"]="${AMTAR} xf -" +S["am__tar"]="${AMTAR} chof - \"$$tardir\"" +S["AMTAR"]="${SHELL} /home/logue/aorta/missing --run tar" +S["am__leading_dot"]="." +S["SET_MAKE"]="" +S["AWK"]="gawk" +S["mkdir_p"]="/bin/mkdir -p" +S["MKDIR_P"]="/bin/mkdir -p" +S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s" +S["STRIP"]="" +S["install_sh"]="${SHELL} /home/logue/aorta/install-sh" +S["MAKEINFO"]="${SHELL} /home/logue/aorta/missing --run makeinfo" +S["AUTOHEADER"]="${SHELL} /home/logue/aorta/missing --run autoheader" +S["AUTOMAKE"]="${SHELL} /home/logue/aorta/missing --run automake-1.11" +S["AUTOCONF"]="${SHELL} /home/logue/aorta/missing --run autoconf" +S["ACLOCAL"]="${SHELL} /home/logue/aorta/missing --run aclocal-1.11" +S["VERSION"]="2.1" +S["PACKAGE"]="aorta" +S["CYGPATH_W"]="echo" +S["am__isrc"]="" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="" +S["LIBS"]=" -L/c/mingw32/lib -Wl,--subsystem,windows -mwindows /c/mingw32/lib/libwx_mswu_xrc-2.9.a /c/mingw32/lib/libwx_mswu_webview-2.9.a /c/mingw32/lib/lib"\ +"wx_mswu_qa-2.9.a /c/mingw32/lib/libwx_baseu_net-2.9.a /c/mingw32/lib/libwx_mswu_html-2.9.a /c/mingw32/lib/libwx_mswu_adv-2.9.a /c/mingw32/lib/libwx_"\ +"mswu_core-2.9.a /c/mingw32/lib/libwx_baseu_xml-2.9.a /c/mingw32/lib/libwx_baseu-2.9.a -lpng -ljpeg -ltiff -lexpat -lwxregexu-2.9 -lz -lrpcrt4 -lolea"\ +"ut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 " +S["ECHO_T"]="" +S["ECHO_N"]="-n" +S["ECHO_C"]="" +S["DEFS"]="-DHAVE_CONFIG_H" +S["mandir"]="${datarootdir}/man" +S["localedir"]="${datarootdir}/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${datarootdir}/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["localstatedir"]="${prefix}/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="${prefix}/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${exec_prefix}/libexec" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/usr/local" +S["exec_prefix"]="${prefix}" +S["PACKAGE_URL"]="" +S["PACKAGE_BUGREPORT"]="http://sf.net/tracker/?group_id=179330&atid=888719" +S["PACKAGE_STRING"]="Aorta 2.1" +S["PACKAGE_VERSION"]="2.1" +S["PACKAGE_TARNAME"]="aorta" +S["PACKAGE_NAME"]="Aorta" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/sh" +_ACAWK +cat >>"$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +D["PACKAGE_NAME"]=" \"Aorta\"" +D["PACKAGE_TARNAME"]=" \"aorta\"" +D["PACKAGE_VERSION"]=" \"2.1\"" +D["PACKAGE_STRING"]=" \"Aorta 2.1\"" +D["PACKAGE_BUGREPORT"]=" \"http://sf.net/tracker/?group_id=179330&atid=888719\"" +D["PACKAGE_URL"]=" \"\"" +D["PACKAGE"]=" \"aorta\"" +D["VERSION"]=" \"2.1\"" +D["STDC_HEADERS"]=" 1" +D["HAVE_SYS_TYPES_H"]=" 1" +D["HAVE_SYS_STAT_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_STRING_H"]=" 1" +D["HAVE_MEMORY_H"]=" 1" +D["HAVE_STRINGS_H"]=" 1" +D["HAVE_INTTYPES_H"]=" 1" +D["HAVE_STDINT_H"]=" 1" +D["HAVE_UNISTD_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE__BOOL"]=" 1" +D["HAVE_STDBOOL_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_MALLOC"]=" 1" +D["HAVE_FLOOR"]=" 1" +D["HAVE_MEMSET"]=" 1" +D["HAVE_POW"]=" 1" +D["HAVE_SQRT"]=" 1" + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { + line = $ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac +ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +} + +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 diff --git a/config.sub b/config.sub new file mode 100644 index 0000000..e76eaf4 --- /dev/null +++ b/config.sub @@ -0,0 +1,1771 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. + +timestamp='2011-11-11' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 \ + | ns16k | ns32k \ + | open8 \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i386-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f0bce81 --- /dev/null +++ b/configure.ac @@ -0,0 +1,65 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.68]) +AC_INIT([Aorta], [2.1], [http://sf.net/tracker/?group_id=179330&atid=888719]) +AC_CONFIG_HEADERS([config.h]) + +AM_INIT_AUTOMAKE + +# Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_CXX +AC_PROG_CXXCPP +AC_PROG_INSTALL + +# Checks for header files. +AC_CHECK_HEADERS([stdlib.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_INLINE + +# Checks for library functions. +AC_FUNC_MALLOC +AC_CHECK_FUNCS([floor memset pow sqrt]) + +# Checks for libsquish. +AC_CHECK_LIB([squish], [main], [founda=yes], [founda=no]) +AC_LANG_PUSH([C++]) +AC_CHECK_HEADER([squish.h], [foundb=yes], [foundb=no]) +AC_LANG_POP() +if test "x$founda" = xno || test "x$foundb" = xno; then + AC_MSG_ERROR([libsquish is missing]) +fi + +# check wxWigets. +AM_OPTIONS_WXCONFIG +reqwx=2.8.0 +AM_PATH_WXCONFIG($reqwx, wxWin=1) + +if test "$wxWin" != 1; then + AC_MSG_ERROR([wxWidgets is missing.]) +else + CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" + CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" + CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" + LIBS="$LIBS $WX_LIBS" +fi + +# add some windows goodies +case $target in +*-*-mingw32*) + make_windows=true + ;; +*) + make_windows=false + ;; +esac +AM_CONDITIONAL(MAKE_WINDOWS, test x$make_windows = xtrue) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT + +echo "Configuration done. Now type \"make\"." diff --git a/depcomp b/depcomp new file mode 100644 index 0000000..bd0ac08 --- /dev/null +++ b/depcomp @@ -0,0 +1,688 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2011-12-04.11; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by `PROGRAMS ARGS'. + object Object file output by `PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> "$depfile" + echo >> "$depfile" + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + # With Tru64 cc, shared objects can also be used to make a + # static library. This mechanism is used in libtool 1.4 series to + # handle both shared and static libraries in a single compilation. + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. + # + # With libtool 1.5 this exception was removed, and libtool now + # generates 2 separate objects for the 2 libraries. These two + # compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 + tmpdepfile2=$dir$base.o.d # libtool 1.5 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.o.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + tmpdepfile4=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/ \1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/ / + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/imagdds.cpp b/imagdds.cpp new file mode 100644 index 0000000..ae711c7 --- /dev/null +++ b/imagdds.cpp @@ -0,0 +1,533 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: imagdds.cpp +// Purpose: wxImage DDS handler +// Author: Gregory Smith +// Copyright: (c) Gregory Smith +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +// currently this file has some Aleph One specializations; some formats are +// ignored or treated differently...caveat emptor + +#include "imagdds.h" + +#include +#ifndef WX_PRECOMP +#include +#endif + +#include + +#include "Filter.h" +#include "FloatImage.h" + +#include "math.h" +#include +#include +#include +using namespace std; + +enum InternalFormat { + Format_None, + Format_DXT1, + Format_DXT3, + Format_DXT5, + Format_RGB, + Format_RGBA +}; + +#define MAKE_FOURCC(a,b,c,d) (((wxUint32(d) << 24) | (wxUint32)(c) << 16) | ((wxUint32)(b) << 8) | (wxUint32)(a)) + +static inline int NextPowerOfTwo(int n) +{ + int p = 1; + while(p < n) {p <<= 1;} + return p; +} + +bool wxDDSHandler::ReadHeader(wxInputStream& stream, DDSURFACEDESC2 &ddsd) +{ + // try to read the whole thing, then swap it + stream.Read(&ddsd, sizeof(ddsd)); + if (stream.LastRead() != sizeof(ddsd)) return FALSE; + + ddsd.dwSize = wxINT32_SWAP_ON_BE(ddsd.dwSize); + ddsd.dwFlags = wxINT32_SWAP_ON_BE(ddsd.dwFlags); + ddsd.dwHeight = wxINT32_SWAP_ON_BE(ddsd.dwHeight); + ddsd.dwWidth = wxINT32_SWAP_ON_BE(ddsd.dwWidth); + ddsd.dwPitchOrLinearSize = wxINT32_SWAP_ON_BE(ddsd.dwPitchOrLinearSize); + ddsd.dwDepth = wxINT32_SWAP_ON_BE(ddsd.dwDepth); + ddsd.dwMipMapCount = wxINT32_SWAP_ON_BE(ddsd.dwMipMapCount); + + ddsd.ddpfPixelFormat.dwSize = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwSize); + ddsd.ddpfPixelFormat.dwFlags = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwFlags); + ddsd.ddpfPixelFormat.dwFourCC = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwFourCC); + ddsd.ddpfPixelFormat.dwRGBBitCount = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwRGBBitCount); + + ddsd.ddsCaps.dwCaps1 = wxINT32_SWAP_ON_BE(ddsd.ddsCaps.dwCaps1); + ddsd.ddsCaps.dwCaps2 = wxINT32_SWAP_ON_BE(ddsd.ddsCaps.dwCaps2); + + return TRUE; + +} + +bool wxDDSHandler::WriteHeader(wxOutputStream &stream, DDSURFACEDESC2 &ddsd) +{ + wxUint32 dwMagic = (wxINT32_SWAP_ON_BE(MAKE_FOURCC('D', 'D', 'S', ' '))); + stream.Write(&dwMagic, sizeof(dwMagic)); + + ddsd.dwSize = wxINT32_SWAP_ON_BE(ddsd.dwSize); + ddsd.dwFlags = wxINT32_SWAP_ON_BE(ddsd.dwFlags); + ddsd.dwHeight = wxINT32_SWAP_ON_BE(ddsd.dwHeight); + ddsd.dwWidth = wxINT32_SWAP_ON_BE(ddsd.dwWidth); + ddsd.dwPitchOrLinearSize = wxINT32_SWAP_ON_BE(ddsd.dwPitchOrLinearSize); + ddsd.dwDepth = wxINT32_SWAP_ON_BE(ddsd.dwDepth); + ddsd.dwMipMapCount = wxINT32_SWAP_ON_BE(ddsd.dwMipMapCount); + + ddsd.ddpfPixelFormat.dwSize = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwSize); + ddsd.ddpfPixelFormat.dwFlags = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwFlags); + ddsd.ddpfPixelFormat.dwFourCC = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwFourCC); + ddsd.ddpfPixelFormat.dwRGBBitCount = wxINT32_SWAP_ON_BE(ddsd.ddpfPixelFormat.dwRGBBitCount); + + ddsd.ddsCaps.dwCaps1 = wxINT32_SWAP_ON_BE(ddsd.ddsCaps.dwCaps1); + ddsd.ddsCaps.dwCaps2 = wxINT32_SWAP_ON_BE(ddsd.ddsCaps.dwCaps2); + + stream.Write(&ddsd, sizeof(ddsd)); + return TRUE; +} + +bool wxDDSHandler::DoCanRead(wxInputStream& stream) +{ + wxUint32 dwMagic; + stream.Read(&dwMagic, sizeof(dwMagic)); + if (stream.LastRead() != sizeof(dwMagic)) return FALSE; + + if (wxINT32_SWAP_ON_BE(dwMagic) != MAKE_FOURCC('D', 'D', 'S', ' ')) return FALSE; + + DDSURFACEDESC2 ddsd; + if (!ReadHeader(stream, ddsd)) return FALSE; + + // validate the sizes + if (ddsd.dwSize != 124) return FALSE; + if (ddsd.ddpfPixelFormat.dwSize != 32) return FALSE; + + if (ddsd.ddsCaps.dwCaps2 & DDSCAPS2_VOLUME) return FALSE; + if (ddsd.ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP) return FALSE; + + if (ddsd.ddpfPixelFormat.dwFlags & DDPF_RGB) { + return (ddsd.ddpfPixelFormat.dwRGBBitCount == 24 || ddsd.ddpfPixelFormat.dwRGBBitCount == 32); + } + else if ((ddsd.ddpfPixelFormat.dwFlags & DDPF_FOURCC) && + (ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '1') || + ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '2') || + ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '3') || + ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '4') || + ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '5'))) + return TRUE; + else + return FALSE; + +} + +static void UnpremultiplyAlpha(wxImage *image) +{ + for (int x = 0; x < image->GetWidth(); x++) { + for (int y = 0; y < image->GetHeight(); y++) { + if (image->GetAlpha(x, y) == 0) continue; + short red = image->GetRed(x, y); + short green = image->GetGreen(x, y); + short blue = image->GetBlue(x, y); + + red = std::min(255, 255 * red / image->GetAlpha(x, y)); + green = std::min(255, 255 * green / image->GetAlpha(x, y)); + blue = std::min(255, 255 * blue / image->GetAlpha(x, y)); + + image->SetRGB(x, y, (unsigned char) red, (unsigned char) green, (unsigned char) blue); + } + } +} + +bool wxDDSHandler::LoadFile(wxImage *image, wxInputStream& stream, bool verbose, int index) +{ + wxUint32 dwMagic; + stream.Read(&dwMagic, sizeof(dwMagic)); + if (stream.LastRead() != sizeof(dwMagic)) return FALSE; + + if (wxINT32_SWAP_ON_BE(dwMagic) != MAKE_FOURCC('D', 'D', 'S', ' ')) return FALSE; + + DDSURFACEDESC2 ddsd; + if (!ReadHeader(stream, ddsd)) return FALSE; + + bool unpremultiplyAlpha = false; + + // just read the first mipmap + InternalFormat internalFormat = Format_None; + if (ddsd.ddpfPixelFormat.dwFlags & DDPF_FOURCC) { + if (ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '1')) + internalFormat = Format_DXT1; + else if (ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '2')) { + unpremultiplyAlpha = true; + internalFormat = Format_DXT3; + } + else if (ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '3')) + internalFormat = Format_DXT3; + else if (ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '4')) { + unpremultiplyAlpha = true; + internalFormat = Format_DXT5; + } + else if (ddsd.ddpfPixelFormat.dwFourCC == MAKE_FOURCC('D', 'X', 'T', '5')) + internalFormat = Format_DXT5; + } else if (ddsd.ddpfPixelFormat.dwFlags & DDPF_RGB) { + if (ddsd.ddpfPixelFormat.dwRGBBitCount == 24) { + internalFormat = Format_RGB; + } else if (ddsd.ddpfPixelFormat.dwRGBBitCount == 32) { + internalFormat = Format_RGBA; + } + } + if (internalFormat == Format_None) return FALSE; + + int width = ddsd.dwWidth; + int height = ddsd.dwHeight; + + if (internalFormat == Format_RGB || internalFormat == Format_RGBA) { + int pitch; + if (ddsd.dwFlags & DDSD_PITCH) { + pitch = ddsd.dwPitchOrLinearSize; + } else if (ddsd.dwFlags & DDSD_LINEARSIZE) { + pitch = ddsd.dwPitchOrLinearSize / ddsd.dwHeight; + } else { + pitch = ((internalFormat == Format_RGB) ? 3 : 4) * width; + } + + if (pitch != ((internalFormat == Format_RGB) ? 3 : 4) * width) + { + fprintf(stderr, "we don't know how to do weird pitch\n"); + return FALSE; + } + + image->Create(width, height); + if (internalFormat == Format_RGBA) + image->InitAlpha(); + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + unsigned char b = stream.GetC(); + if (stream.LastRead() != 1) { + return FALSE; + } + unsigned char g = stream.GetC(); + if (stream.LastRead() != 1) { + return FALSE; + } + unsigned char r = stream.GetC(); + if (stream.LastRead() != 1) { + return FALSE; + } + + image->SetRGB(x, y, r, g, b); + + if (internalFormat == Format_RGBA) + { + image->SetAlpha(x, y, stream.GetC()); + if (stream.LastRead() != 1) { + return FALSE; + } + } + } + } + + return TRUE; + } + + int bpp = (internalFormat == Format_DXT1) ? 4 : 8; + int potWidth = NextPowerOfTwo(width); + int potHeight = NextPowerOfTwo(height); + + int compressedBufferSize = (potWidth * potHeight * bpp) / 8; + + vector compressedBuffer(width * height * bpp / 8); + stream.Read(&compressedBuffer.front(), compressedBuffer.size()); + if (stream.LastRead() != compressedBuffer.size()) { + return FALSE; + } + + image->Create(width, height); + vector uncompressedBuffer(width * height * 4); + int flags; + if (internalFormat == Format_DXT1) { + flags = squish::kDxt1; + } else { + if (internalFormat == Format_DXT3) { + flags = squish::kDxt3; + } else { + flags = squish::kDxt5; + } + image->InitAlpha(); + } + + squish::DecompressImage(&uncompressedBuffer.front(), width, height, &compressedBuffer.front(), flags); + + for (int x = 0; x < width; x++) { + for (int y = 0; y < height; y++) { + image->GetData()[(x + y * width) * 3 + 0] = uncompressedBuffer[(x + y * width) * 4 + 0]; + image->GetData()[(x + y * width) * 3 + 1] = uncompressedBuffer[(x + y * width) * 4 + 1]; + image->GetData()[(x + y * width) * 3 + 2] = uncompressedBuffer[(x + y * width) * 4 + 2]; + if (image->HasAlpha()) { + image->GetAlpha()[(x + y * width)] = uncompressedBuffer[(x + y * width) * 4 + 3]; + } + } + + } + + if (unpremultiplyAlpha) + UnpremultiplyAlpha(image); + + return TRUE; +} + +static void PremultiplyAlpha(wxImage *image) +{ + for (int x = 0; x < image->GetWidth(); x++) { + for (int y = 0; y < image->GetHeight(); y++) { + short red = image->GetRed(x, y); + short green = image->GetGreen(x, y); + short blue = image->GetBlue(x, y); + + red = (image->GetAlpha(x, y) * red + 127) / 255; + green = (image->GetAlpha(x, y) * green + 127) / 255; + blue = (image->GetAlpha(x, y) * blue + 127) / 255; + + image->SetRGB(x, y, (unsigned char) red, (unsigned char) green, (unsigned char) blue); + } + } +} + +bool wxDDSHandler::SaveFile(wxImage *image, wxOutputStream& stream, bool verbose) +{ + + wxBusyCursor getBusy; + + bool mipmap = image->HasOption(wxIMAGE_OPTION_DDS_USE_MIPMAPS) && + image->GetOptionInt(wxIMAGE_OPTION_DDS_USE_MIPMAPS); + bool compress = image->HasOption(wxIMAGE_OPTION_DDS_COMPRESS) && + image->GetOptionInt(wxIMAGE_OPTION_DDS_COMPRESS); + bool premultiply = image->HasOption(wxIMAGE_OPTION_DDS_PREMULTIPLY_ALPHA) && + image->GetOptionInt(wxIMAGE_OPTION_DDS_PREMULTIPLY_ALPHA); + + if (compress) { + if ((image->GetHeight() & 3) || (image->GetWidth() & 3)) { + image->Rescale((image->GetWidth() + 3) & ~3, (image->GetHeight() + 3) & ~3); + } + } + + DDSURFACEDESC2 ddsd; + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = 124; + ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; + ddsd.dwHeight = image->GetHeight(); + ddsd.dwWidth = image->GetWidth(); + if (compress) { + ddsd.dwFlags |= DDSD_LINEARSIZE; + if (image->HasAlpha()) { + ddsd.dwPitchOrLinearSize = image->GetWidth() / 4 * image->GetHeight() / 4 * 16; + + ddsd.ddpfPixelFormat.dwFourCC = MAKE_FOURCC('D', 'X', 'T', '5'); + } else { + ddsd.dwPitchOrLinearSize = image->GetWidth() / 4 * image->GetHeight() / 4 * 8; + ddsd.ddpfPixelFormat.dwFourCC = MAKE_FOURCC('D', 'X', 'T', '1'); + } + } else { + ddsd.dwFlags |= DDSD_PITCH; + if (image->HasAlpha()) { + ddsd.dwPitchOrLinearSize = image->GetWidth() * 4; + } else { + ddsd.dwPitchOrLinearSize = image->GetWidth() * 3; + } + } + + int mipmap_count; + + if (mipmap) { + mipmap_count = ddsd.dwMipMapCount = NumMipmaps(*image); + ddsd.dwFlags |= DDSD_MIPMAPCOUNT; + } + + ddsd.ddpfPixelFormat.dwSize = 32; + if (compress) { + ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; + } else { + ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB; + ddsd.ddpfPixelFormat.dwRBitMask = wxINT32_SWAP_ON_BE(0x00ff0000); + ddsd.ddpfPixelFormat.dwGBitMask = wxINT32_SWAP_ON_BE(0x0000ff00); + ddsd.ddpfPixelFormat.dwBBitMask = wxINT32_SWAP_ON_BE(0x000000ff); + if (image->HasAlpha()) + { + ddsd.ddpfPixelFormat.dwRGBBitCount = 32; + ddsd.ddpfPixelFormat.dwRGBAlphaBitMask = wxINT32_SWAP_ON_BE(0xff000000); + ddsd.ddpfPixelFormat.dwFlags |= DDPF_ALPHAPIXELS; + } else { + ddsd.ddpfPixelFormat.dwRGBBitCount = 24; + } + } + + ddsd.ddsCaps.dwCaps1 = DDSCAPS_TEXTURE; + if (mipmap) ddsd.ddsCaps.dwCaps1 |= DDSCAPS_MIPMAP | DDSCAPS_COMPLEX; + + WriteHeader(stream, ddsd); + + if (premultiply) + PremultiplyAlpha(image); + + long filter = wxIMAGE_OPTION_DDS_FILTER_BOX; + if (image->HasOption(wxIMAGE_OPTION_DDS_MIPMAP_FILTER)) + filter = image->GetOptionInt(wxIMAGE_OPTION_DDS_MIPMAP_FILTER); + + long wrap_mode = wxIMAGE_OPTION_DDS_WRAP_CLAMP; + if (image->HasOption(wxIMAGE_OPTION_DDS_MIPMAP_WRAP_MODE)) + wrap_mode = image->GetOptionInt(wxIMAGE_OPTION_DDS_MIPMAP_WRAP_MODE); + + wxImage minImage = *image; + + for (int level = 0; level < ((mipmap) ? mipmap_count : 1); level++) { + if (level) minImage = Minify(minImage, filter, wrap_mode); + if (compress) { + if (image->HasAlpha()) { + WriteDXT5(minImage, stream); + } else { + WriteDXT1(minImage, stream); + } + } else { + WriteRGBA(minImage, stream); + } + } +} + +int wxDDSHandler::NumMipmaps(const wxImage &image) +{ + return (1 + (int) floor(log(std::max(image.GetWidth(), image.GetHeight())) / log(2))); +} + +static vector BuildRGBAImage(const wxImage& image) +{ + vector buffer(image.GetWidth() * image.GetHeight() * 4); + for (int x = 0; x < image.GetWidth(); x++) { + for (int y = 0; y < image.GetHeight(); y++) { + buffer[(x + y * image.GetWidth()) * 4 + 0] = image.GetRed(x, y); + buffer[(x + y * image.GetWidth()) * 4 + 1] = image.GetGreen(x, y); + buffer[(x + y * image.GetWidth()) * 4 + 2] = image.GetBlue(x, y); + if (image.HasAlpha()) + buffer[(x + y * image.GetWidth()) * 4 + 3] = image.GetAlpha(x, y); + else + buffer[(x + y * image.GetWidth()) * 4 + 3] = 0xff; + } + } + + return buffer; +} + + +void wxDDSHandler::WriteDXT1(const wxImage& image, wxOutputStream& stream) +{ + // use DXT3 to force 4 colors + vector compressedBuffer(squish::GetStorageRequirements(image.GetWidth(), image.GetHeight(), squish::kDxt3)); + squish::CompressImage(&BuildRGBAImage(image).front(), image.GetWidth(), image.GetHeight(), &compressedBuffer.front(), squish::kDxt3 | squish::kColourIterativeClusterFit); + + // skip the alpha blocks, and just write the colors + unsigned int i = 0; + while (i <= compressedBuffer.size() - 16) + { + i += 8; + stream.Write(&compressedBuffer[i], 8); + i += 8; + } +} + + +void wxDDSHandler::WriteDXT5(const wxImage& image, wxOutputStream& stream) +{ + vector compressedBuffer(squish::GetStorageRequirements(image.GetWidth(), image.GetHeight(), squish::kDxt5)); + squish::CompressImage(&BuildRGBAImage(image).front(), image.GetWidth(), image.GetHeight(), &compressedBuffer.front(), squish::kDxt5); + stream.Write(&compressedBuffer.front(), compressedBuffer.size()); +} + +void wxDDSHandler::WriteRGBA(const wxImage& image, wxOutputStream& stream) +{ + for (int y = 0; y < image.GetHeight(); y++) { + for (int x = 0; x < image.GetWidth(); x++) { + stream.PutC(image.GetBlue(x, y)); + stream.PutC(image.GetGreen(x, y)); + stream.PutC(image.GetRed(x, y)); + if (image.HasAlpha()) + { + stream.PutC(image.GetAlpha(x, y)); + } + } + } +} + +wxImage wxDDSHandler::Minify(wxImage &image, long filter, long wrap_mode) +{ + if (image.GetWidth() == 1 && image.GetHeight() == 1) return image; + + FloatImage f; + + f.allocate(4, image.GetWidth(), image.GetHeight()); + for (int x = 0; x < image.GetWidth(); ++x) { + for (int y = 0; y < image.GetHeight(); ++y) { + f.setPixel(image.GetRed(x, y) / 255.0f, x, y, 0); + f.setPixel(image.GetGreen(x, y) / 255.0f, x, y, 1); + f.setPixel(image.GetBlue(x, y) / 255.0f, x, y, 2); + if (image.HasAlpha()) { + f.setPixel(image.GetAlpha(x, y) / 255.0f, x, y, 3); + } else { + f.setPixel(1.0f, x, y, 3); + } + } + } + + // convert channels 0 through 2 (R through B) to linear space + f.toLinear(0, 2); + + wxImage minifiedImage; + + FloatImage::WrapMode wm = FloatImage::WrapMode_Clamp; + if (wrap_mode == wxIMAGE_OPTION_DDS_WRAP_REPEAT) + wm = FloatImage::WrapMode_Repeat; + else if (wrap_mode == wxIMAGE_OPTION_DDS_WRAP_MIRROR) + wm = FloatImage::WrapMode_Mirror; + + std::auto_ptr minif; + if (filter == wxIMAGE_OPTION_DDS_FILTER_TRIANGLE) { + TriangleFilter filter; + minif.reset(f.downSample(TriangleFilter(), wm)); + } else if (filter == wxIMAGE_OPTION_DDS_FILTER_KAISER) { + minif.reset(f.downSample(KaiserFilter(3), wm)); + } else { + minif.reset(f.fastDownSample()); + } + + minif->toGamma(0, 2); + minifiedImage.Create(minif->width(), minif->height()); + + for (int x = 0; x < minif->width(); ++x) { + for (int y = 0; y < minif->height(); ++y) { + unsigned int r = clamp((int) (minif->pixel(x, y, 0) * 255.0f), 0, 255); + unsigned int g = clamp((int) (minif->pixel(x, y, 1) * 255.0f), 0, 255); + unsigned int b = clamp((int) (minif->pixel(x, y, 2) * 255.0f), 0, 255); + minifiedImage.SetRGB(x, y, r, g, b); + } + } + + if (image.HasAlpha()) { + minifiedImage.InitAlpha(); + for (int x = 0; x < minif->width(); ++x) { + for (int y = 0; y < minif->height(); ++y) { + minifiedImage.SetAlpha(x, y, clamp((int) (minif->pixel(x, y, 3) * 255.0f), 0, 255)); + } + } + } + + return minifiedImage; +} + + + diff --git a/imagdds.h b/imagdds.h new file mode 100644 index 0000000..251e8de --- /dev/null +++ b/imagdds.h @@ -0,0 +1,122 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: imagdds.h +// Purpose: wxImage DDS handler +// Author: Gregory Smith +// Copyright: (c) Gregory Smith +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifndef IMAGDDS_H_ +#define IMAGDDS_H_ + +#include "wx/image.h" + +#define wxIMAGE_OPTION_DDS_USE_MIPMAPS wxT("DdsMipmap") +#define wxIMAGE_OPTION_DDS_FORMAT wxT("DdsFormat") +#define wxIMAGE_OPTION_DDS_COMPRESS wxT("DdsCompress") +#define wxIMAGE_OPTION_DDS_PREMULTIPLY_ALPHA wxT("DdsPremultiplyAlpha") +#define wxIMAGE_OPTION_DDS_MIPMAP_FILTER wxT("MipmapFilter") +#define wxIMAGE_OPTION_DDS_MIPMAP_WRAP_MODE wxT("WrapMode") + +#define wxIMAGE_OPTION_DDS_FILTER_BOX 0 +#define wxIMAGE_OPTION_DDS_FILTER_TRIANGLE 1 +#define wxIMAGE_OPTION_DDS_FILTER_KAISER 2 + +#define wxIMAGE_OPTION_DDS_WRAP_CLAMP 0 +#define wxIMAGE_OPTION_DDS_WRAP_REPEAT 1 +#define wxIMAGE_OPTION_DDS_WRAP_MIRROR 2 + +#ifndef __DDRAW_INCLUDED__ + +#define DDSD_CAPS 0x00000001 +#define DDSD_HEIGHT 0x00000002 +#define DDSD_WIDTH 0x00000004 +#define DDSD_PITCH 0x00000008 +#define DDSD_PIXELFORMAT 0x00001000 +#define DDSD_MIPMAPCOUNT 0x00020000 +#define DDSD_LINEARSIZE 0x00080000 +#define DDSD_DEPTH 0x00800000 + +#define DDPF_ALPHAPIXELS 0x00000001 +#define DDPF_FOURCC 0x00000004 +#define DDPF_RGB 0x00000040 + +#define DDSCAPS_COMPLEX 0x00000008 +#define DDSCAPS_TEXTURE 0x00001000 +#define DDSCAPS_MIPMAP 0x00400000 + +#define DDSCAPS2_CUBEMAP 0x00000200 +#define DDSCAPS2_VOLUME 0x00200000 + +struct DDSURFACEDESC2 +{ + wxUint32 dwSize; + wxUint32 dwFlags; + wxUint32 dwHeight; + wxUint32 dwWidth; + wxUint32 dwPitchOrLinearSize; + wxUint32 dwDepth; + wxUint32 dwMipMapCount; + wxUint32 dwReserved1[11]; + + struct { + wxUint32 dwSize; + wxUint32 dwFlags; + wxUint32 dwFourCC; + wxUint32 dwRGBBitCount; + wxUint32 dwRBitMask; + wxUint32 dwGBitMask; + wxUint32 dwBBitMask; + wxUint32 dwRGBAlphaBitMask; + } ddpfPixelFormat; + + struct { + wxUint32 dwCaps1; + wxUint32 dwCaps2; + wxUint32 Reserved[2]; + } ddsCaps; + + wxUint32 dwReserved2; +}; + +#endif + +class wxDDSHandler : public wxImageHandler +{ +public: + enum { + wxBITMAP_TYPE_DDS = wxBITMAP_TYPE_ANY + 1 + }; + + /* + wxDDSHandler() + { + m_name = _T("Direct Draw Surface file"); + m_extension = _T("dds"); + m_type = wxBITMAP_TYPE_DDS; + } + */ +#if wxUSE_STREAMS + virtual bool SaveFile ( wxImage *image, wxOutputStream& stream, bool verbose=true ); + virtual bool LoadFile ( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1); + virtual bool DoCanRead( wxInputStream& stream ); +private: + bool ReadHeader(wxInputStream& stream, DDSURFACEDESC2 &ddsd); + bool WriteHeader(wxOutputStream& stream, DDSURFACEDESC2 &ddsd); + + // number of mipmap levels, including the first one + int NumMipmaps(const wxImage& image); + + // handles RGB too + void WriteRGBA(const wxImage& image, wxOutputStream& stream); + + void WriteDXT1(const wxImage& image, wxOutputStream& stream); + void WriteDXT5(const wxImage& image, wxOutputStream& stream); +// wxImage Minify(wxImage& image, int level);\ +private: + wxImage Minify(wxImage& image, long filter, long wrap_mode); +#endif + +}; + +#endif diff --git a/image_ext.cpp b/image_ext.cpp new file mode 100644 index 0000000..b28e66b --- /dev/null +++ b/image_ext.cpp @@ -0,0 +1,332 @@ +/* + + image_ext.cpp: extra functionality for wxImage + Copyright (C) 2006 Gregory Smith + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + */ + +#include "image_ext.h" +#include +#include + +void wxImageExt::White() +{ + int NumBytes = GetWidth() * GetHeight() * 3; + for (int i = 0; i < NumBytes; i++) + { + GetData()[i] = 0xff; + } +} + +void wxImageExt::RemoveAlpha() +{ + wxImageExt image; + image.Create(GetWidth(), GetHeight()); + memcpy(image.GetData(), GetData(), GetWidth() * GetHeight() * 3); + + *this = image; +} + +void wxImageExt::MaskToAlpha() +{ + wxImageExt image; + image.Create(GetWidth(), GetHeight()); + image.InitAlpha(); + image.SetMask(false); + + memcpy(image.GetData(), GetData(), GetWidth() * GetHeight() * 3); + + for (int x = 0; x < GetWidth(); x++) + { + for (int y = 0; y < GetHeight(); y++) + { + if (IsTransparent(x, y)) + { + image.GetAlpha()[x + y * GetWidth()] = 0x00; + } + else + { + image.GetAlpha()[x + y * GetWidth()] = 0xff; + } + } + } + + *this = image; +} + +void wxImageExt::PropRescale(int width, int height) +{ + float scale = (float) std::max(width, height) / std::max(GetWidth(), GetHeight()); + Rescale((int) (GetWidth() * scale), (int) (GetHeight() * scale)); + Resize(wxSize(width, height), wxPoint((width - GetWidth()) / 2, (height - GetHeight()) / 2)); +} + +void wxImageExt::FromAlpha(const wxImageExt& source) +{ + Create(source.GetWidth(), source.GetHeight()); + int NumPixels = GetWidth() * GetHeight(); + for (int i = 0; i < NumPixels; i++) + { + GetData()[i * 3 + 0] = GetData()[i * 3 + 1] = GetData()[i * 3 + 2] = source.GetAlpha()[i]; + } +} + +void wxImageExt::ToAlpha(wxImageExt& dest) const +{ + if (!dest.HasAlpha()) + { + dest.InitAlpha(); + } + + int NumPixels = GetWidth() * GetHeight(); + for (int i = 0; i < NumPixels; i++) + { + unsigned int Average = (GetData()[i * 3 + 0] + GetData()[i * 3 + 1] + GetData()[i * 3 + 2]) / 3; + dest.GetAlpha()[i] = Average & 0xff; + } +} + +void wxImageExt::MakeOpacTypeTwo() +{ + wxImageExt image; + image.Create(GetWidth(), GetHeight()); + int NumPixels = GetWidth() * GetHeight(); + for (int i = 0; i < NumPixels; i++) + { + unsigned int Average = (GetData()[i * 3 + 0] + GetData()[i * 3 + 1] + GetData()[i * 3 + 2]) / 3; + image.GetData()[i * 3 + 0] = image.GetData()[i * 3 + 1] = image.GetData()[i * 3 + 2] = Average & 0xff; + } + + *this = image; +} + +void wxImageExt::MakeOpacTypeThree() +{ + wxImageExt image; + image.Create(GetWidth(), GetHeight()); + int NumPixels = GetWidth() * GetHeight(); + for (int i = 0; i < NumPixels; i++) + { + unsigned char Max = std::max(GetData()[i * 3 + 0], std::max(GetData()[i * 3 + 1], GetData()[i * 3 + 2])); + image.GetData()[i * 3 + 0] = image.GetData()[i * 3 + 1] = image.GetData()[i * 3 + 2] = Max; + } + + *this = image; +} + +static inline unsigned char WrapBlue(const wxImageExt& image, int x, int y, int w, int h) { + if (x < 0) x += w; else if (x > w - 1) x -= w; + if (y < 0) y += h; else if (y > h - 1) y -= h; + return image.GetData()[(y * w + x) * 3 + 2]; +} + +void wxImageExt::MakeNormalMap() +{ + wxImageExt image; + image.Create(GetWidth(), GetHeight()); + + float fs, ft, fr, fd; + unsigned char mat[3][3]; + + int width = GetWidth(); + int height = GetHeight(); + + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) { + mat[0][0] = WrapBlue(*this, x - 1, y - 1, width, height); + mat[0][1] = WrapBlue(*this, x, y - 1, width, height); + mat[0][2] = WrapBlue(*this, x + 1, y - 1, width, height); + mat[1][0] = WrapBlue(*this, x - 1, y, width, height); + mat[1][2] = WrapBlue(*this, x + 1, y, width, height); + mat[2][0] = WrapBlue(*this, x - 1, y + 1, width, height); + mat[2][1] = WrapBlue(*this, x, y + 1, width, height); + mat[2][2] = WrapBlue(*this, x + 1, y + 1, width, height); + + // Sobel operator horizontal + fs = (1.0 * mat[0][0] - 1.0 * mat[0][2] + + 2.0 * mat[1][0] - 2.0 * mat[1][2] + + 1.0 * mat[2][0] - 1.0 * mat[2][2]) / 255.0; + + ft = (1.0 * mat[2][0] - 1.0 * mat[0][0] + + 2.0 * mat[2][1] - 2.0 * mat[0][1] + + 1.0 * mat[2][2] - 1.0 * mat[0][2]) / 255.0; + + fr = 0.5 * std::sqrt(1.0 + fs * fs + ft * ft); + + // normalize vector (r, s, t) + fd = 1.0 / std::sqrt(fr * fr + fs * fs + ft * ft); + fs *= fd; + ft *= fd; + fr *= fd; + + image.SetRGB(x, y, (unsigned char) (0x80 + fs * 0x7f), (unsigned char) (0x80 + ft * 0x7f), (unsigned char) (0x80 + fr * 0x7f)); + } + } + + *this = image; + +} + +// thanks to the Virtual Terrain Project for this algorithm, and the code looks +// pretty similar too... + +void wxImageExt::ReconstructColors(const wxColour& bgColor) +{ + // restore the color of edge texels by guessing correct non-background color + + for (int x = 0; x < GetWidth(); x++) { + for (int y = 0; y < GetHeight(); y++) { + if (GetAlpha(x, y) == 0) { + SetAlpha(x, y, 0); + SetRGB(x, y, bgColor.Red(), bgColor.Green(), bgColor.Blue()); + } else if (GetAlpha(x, y) == 0xff) { + SetAlpha(x, y, 0xff); + SetRGB(x, y, GetRed(x, y), GetGreen(x, y), GetBlue(x, y)); + } else { + float blend_factor = GetAlpha(x, y) / 255.0f; + SetAlpha(x, y, GetAlpha(x, y)); + short rDiff = GetRed(x, y) - bgColor.Red(); + short gDiff = GetGreen(x, y) - bgColor.Green(); + short bDiff = GetBlue(x, y) - bgColor.Blue(); + + SetRGB(x, y, PIN(bgColor.Red() + (int) (rDiff * (1.0f / blend_factor)), 0, 255), PIN(bgColor.Green() + (int) (gDiff * (1.0f / blend_factor)), 0, 255), PIN(bgColor.Blue() + (int) (bDiff * (1.0f / blend_factor)), 0, 255)); + } + } + } + +} + +void wxImageExt::UnpremultiplyAlpha() +{ + for (int x = 0; x < GetWidth(); x++) { + for (int y = 0; y < GetHeight(); y++) { + if (GetAlpha(x, y) == 0) continue; + short red = GetRed(x, y); + short green = GetGreen(x, y); + short blue = GetBlue(x, y); + + red = std::min(255, 255 * red / GetAlpha(x, y)); + green = std::min(255, 255 * green / GetAlpha(x, y)); + blue = std::min(255, 255 * blue / GetAlpha(x, y)); + + SetRGB(x, y, (unsigned char) red, (unsigned char) green, (unsigned char) blue); + } + } +} + +static bool Downsample(wxImage &src, wxImage &dst) +{ + if (src.GetWidth() == 2 || src.GetHeight() == 2) return false; + int holes = 0; + for (int y = 0; y < src.GetHeight(); y++) { + for (int x = 0; x < src.GetWidth(); x++) { + if (src.GetAlpha(x, y) == 0) { + holes++; + } + } + } + + if (holes == 0) return false; + + dst.Create(src.GetWidth() / 2, src.GetHeight() / 2, true); + dst.InitAlpha(); + + for (int y = 0; y < dst.GetHeight(); y++) { + for (int x = 0; x < dst.GetWidth(); x++) { + + const int x0 = 2 * x + 0; + const int x1 = 2 * x + 1; + const int y0 = 2 * y + 0; + const int y1 = 2 * y + 1; + + if (src.GetAlpha(x0, y0) || src.GetAlpha(x1, y0) || src.GetAlpha(x0, y1) || src.GetAlpha(x1, y1)) + { + unsigned int rSum = 0; + unsigned int gSum = 0; + unsigned int bSum = 0; + unsigned int aSum = 0; + int total = 0; + if (src.GetAlpha(x0, y0)) { + rSum += src.GetRed(x0, y0); + gSum += src.GetGreen(x0, y0); + bSum += src.GetBlue(x0, y0); + total++; + } + if (src.GetAlpha(x1, y0)) { + rSum += src.GetRed(x1, y0); + gSum += src.GetGreen(x1, y0); + bSum += src.GetBlue(x1, y0); + total++; + } + if (src.GetAlpha(x0, y1)) { + rSum += src.GetRed(x0, y1); + gSum += src.GetGreen(x0, y1); + bSum += src.GetBlue(x0, y1); + total++; + } + if (src.GetAlpha(x1, y1)) { + rSum += src.GetRed(x1, y1); + gSum += src.GetGreen(x1, y1); + bSum += src.GetBlue(x1, y1); + total++; + } + + dst.SetRGB(x, y, (unsigned char) (rSum / total), (unsigned char) (gSum / total), (unsigned char) (bSum / total)); + dst.SetAlpha(x, y, 255); + } else { + dst.SetRGB(x, y, 0, 0, 0); + dst.SetAlpha(x, y, 0); + } + } + } + + return true; + +} + +// This is the filter used in the Lumigraph paper. The Unreal engine uses something similar. +void wxImageExt::PrepareForMipmaps() +{ + std::vector mipmaps; + + mipmaps.push_back(*this); + + wxImageExt temp; + while (Downsample(mipmaps.back(), temp)) + { + mipmaps.push_back(temp); + } + + for (int y = 0; y < GetHeight(); y++) { + for (int x = 0; x < GetWidth(); x++) { + + int sx = x; + int sy = y; + + for (int l = 0; l < mipmaps.size(); l++) { + if (mipmaps[l].GetAlpha(sx, sy)) + { + SetRGB(x, y, mipmaps[l].GetRed(sx, sy), mipmaps[l].GetGreen(sx, sy), mipmaps[l].GetBlue(sx, sy)); + break; + } + + sx /= 2; + sy /= 2; + } + } + } +} diff --git a/image_ext.h b/image_ext.h new file mode 100644 index 0000000..3da818a --- /dev/null +++ b/image_ext.h @@ -0,0 +1,59 @@ +/* + + image_ext.h: extra functionality for wxImage + Copyright (C) 2006 Gregory Smith + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + */ + +#ifndef IMAGE_EXT_H +#define IMAGE_EXT_H + +#include +#ifndef WX_PRECOMP +#include +#include +#include +#endif + +#include + +#define PIN(value,floor,ceiling) (std::min(std::max((value),(floor)),(ceiling))) + +class wxImageExt : public wxImage +{ +public: + wxImageExt() : wxImage() { } + wxImageExt(const wxImageExt& image) : wxImage(image) { } + wxImageExt(int width, int height, bool clear=true) : wxImage(width, height, clear) { } + + void White(); // make the image entirely opaque white + void RemoveAlpha(); // remove the alpha channel + void MaskToAlpha(); // convert the mask to an alpha channel + void PropRescale(int width, int height); // scale to fit but maintain proportions + void FromAlpha(const wxImageExt& source); // create a grayscale representation of source's alpha + void ToAlpha(wxImageExt& dest) const; // export our grayscale representation to the dest's alpha channel + void MakeOpacTypeTwo(); + void MakeOpacTypeThree(); + void MakeNormalMap(); + + void UnpremultiplyAlpha(); + + void ReconstructColors(const wxColour&); + void PrepareForMipmaps(); +}; + +#endif diff --git a/install-sh b/install-sh new file mode 100644 index 0000000..a9244eb --- /dev/null +++ b/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-01-19.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for `test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/makedmg.sh b/makedmg.sh new file mode 100644 index 0000000..b67be40 --- /dev/null +++ b/makedmg.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +DMG_DIR=.build-dmg +VOL_NAME=Aorta +DMG_NAME=Aorta-`cat VERSION`.dmg + +mkdir "$DMG_DIR" +cp -r build/Release/Aorta.app "$DMG_DIR" +cp COPYING "$DMG_DIR/COPYING.txt" +cp README "$DMG_DIR/README.txt" +rm -f "$DMG_NAME" +hdiutil create -format UDBZ -srcfolder .build-dmg -volname "$VOL_NAME" "$DMG_NAME" +rm -rf "$DMG_DIR" \ No newline at end of file diff --git a/makezip.sh b/makezip.sh new file mode 100644 index 0000000..dfab2b4 --- /dev/null +++ b/makezip.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +BUILD_ZIP_DIR=.build-zip +ZIP_DIR=Aorta +ZIP_NAME=Aorta-`cat VERSION`.zip + +mkdir -p "$BUILD_ZIP_DIR/$ZIP_DIR" +cp Aorta.exe "$BUILD_ZIP_DIR/$ZIP_DIR/" +cp COPYING "$BUILD_ZIP_DIR/$ZIP_DIR/COPYING.txt" +cp README "$BUILD_ZIP_DIR/$ZIP_DIR/README.txt" +cd "$BUILD_ZIP_DIR" +zip -r "../$ZIP_NAME" "$ZIP_DIR" +cd .. +rm -rf "$BUILD_ZIP_DIR" diff --git a/missing b/missing new file mode 100644 index 0000000..28055d2 --- /dev/null +++ b/missing @@ -0,0 +1,376 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2009-04-28.21; # UTC + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + tar*) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG="\${$#}" + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + tar*) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case $firstarg in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case $firstarg in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/stamp-h1 b/stamp-h1 new file mode 100644 index 0000000..4547fe1 --- /dev/null +++ b/stamp-h1 @@ -0,0 +1 @@ +timestamp for config.h -- 2.11.0