From 71f8c2825c3bda149049e2d8875fb6dd8e85468b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 30 Apr 2006 20:27:33 +0000 Subject: [PATCH] Removed automake dependency, to allow Universal binaries on Mac OS X --- CHANGES | 3 + Makefile-EXE.wat | 33 -- Makefile.am | 80 --- Makefile.wat | 75 --- SDLMIXER.lnk | 91 --- Watcom-EXE.mif | 30 - Watcom-OS2.zip | Bin 0 -> 3968 bytes Watcom.mif | 34 -- autogen.sh | 18 +- config.guess => build-scripts/config.guess | 627 ++++++++++++--------- config.sub => build-scripts/config.sub | 237 ++++++-- build-scripts/install-sh | 323 +++++++++++ ltmain.sh => build-scripts/ltmain.sh | 0 build-scripts/makedep.sh | 83 +++ build-scripts/mkinstalldirs | 99 ++++ configure.in | 149 +++-- mikmod/Makefile.am | 30 - music_cmd.c | 5 +- music_cmd.h | 4 +- native_midi/Makefile.am | 11 - native_midi/native_midi_common.c | 2 +- native_midi/native_midi_mac.c | 8 +- native_midi/native_midi_win32.c | 3 +- native_midi_gpl/Makefile.am | 16 - playmus.lnk | 21 - playwave.lnk | 21 - timidity/Makefile.am | 31 - timidity/config.h | 58 +- timidity/instrum.c | 2 +- timidity/output.h | 2 +- 30 files changed, 1162 insertions(+), 934 deletions(-) delete mode 100644 Makefile-EXE.wat delete mode 100644 Makefile.am delete mode 100644 Makefile.wat delete mode 100644 SDLMIXER.lnk delete mode 100644 Watcom-EXE.mif create mode 100644 Watcom-OS2.zip delete mode 100644 Watcom.mif rename config.guess => build-scripts/config.guess (81%) mode change 100644 => 100755 rename config.sub => build-scripts/config.sub (87%) mode change 100644 => 100755 create mode 100755 build-scripts/install-sh rename ltmain.sh => build-scripts/ltmain.sh (100%) create mode 100755 build-scripts/makedep.sh create mode 100755 build-scripts/mkinstalldirs delete mode 100644 mikmod/Makefile.am delete mode 100644 native_midi/Makefile.am delete mode 100644 native_midi_gpl/Makefile.am delete mode 100644 playmus.lnk delete mode 100644 playwave.lnk delete mode 100644 timidity/Makefile.am diff --git a/CHANGES b/CHANGES index 9597b45f..507f68c2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ 1.2.7: +Sam Lantinga - Sun Apr 30 09:01:44 PDT 2006 + * Removed automake dependency, to allow Universal binaries on Mac OS X + * Added gcc-fat.sh for generating Universal binaries on Mac OS X Sam Lantinga - Sun Apr 30 01:48:40 PDT 2006 * Updated libtool support to version 1.5.22 Patrice Mandin - Sat Jul 16 16:43:24 UTC 2005 diff --git a/Makefile-EXE.wat b/Makefile-EXE.wat deleted file mode 100644 index 95e89971..00000000 --- a/Makefile-EXE.wat +++ /dev/null @@ -1,33 +0,0 @@ -#============================================================================= -# This is a Watcom makefile to build SDLMIXER.DLL for OS/2 -# -# -#============================================================================= - -object_files= playwave.obj playmus.obj - -# Extra stuffs to pass to C compiler: -ExtraCFlags= - -# -#============================================================================== -# -!include Watcom-EXE.mif - -.before - @set include=$(%os2tk)\h;$(%include);$(%sdlhome)\include;.\; - -all : playwave.exe playmus.exe - -playwave.exe: $(object_files) - wlink @playwave.lnk - -playmus.exe: $(object_files) - wlink @playmus.lnk - -clean : .SYMBOLIC - @if exist *.exe del *.exe - @if exist *.obj del *.obj - @if exist *.map del *.map - @if exist *.res del *.res - @if exist *.lst del *.lst diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index bc02ff8a..00000000 --- a/Makefile.am +++ /dev/null @@ -1,80 +0,0 @@ -# Makefile.am for the SDL sample mixer library and players - -lib_LTLIBRARIES = libSDL_mixer.la - -SUBDIRS = @MUSIC_SUBDIRS@ -DIST_SUBDIRS = mikmod timidity native_midi native_midi_gpl - -libSDL_mixerincludedir = $(includedir)/SDL -libSDL_mixerinclude_HEADERS = \ - SDL_mixer.h - -libSDL_mixer_la_SOURCES = \ - load_aiff.c \ - load_aiff.h \ - load_voc.c \ - load_voc.h \ - load_ogg.c \ - load_ogg.h \ - mixer.c \ - music.c \ - music_cmd.c \ - music_cmd.h \ - music_ogg.c \ - music_ogg.h \ - wavestream.c \ - wavestream.h \ - effect_position.c \ - effect_stereoreverse.c \ - effects_internal.c \ - effects_internal.h - -if USE_MIKMOD -MIKMOD_LIB = mikmod/libmikmod.la -else -MIKMOD_LIB = -endif -if USE_TIMIDITY -TIMIDITY_LIB = timidity/libtimidity.la -else -TIMIDITY_LIB = -endif -if USE_NATIVE_MIDI -if USE_NATIVE_MIDI_GPL -NATIVE_MIDI_LIB = native_midi_gpl/libnativemidi_gpl.la -else -NATIVE_MIDI_LIB = native_midi/libnativemidi.la -endif -else -NATIVE_MIDI_LIB = -endif - -EXTRA_DIST = \ - CHANGES \ - VisualC.zip \ - Xcode.tar.gz \ - MPWmake.sea.bin \ - CWProjects.sea.bin \ - SDL_mixer.spec \ - SDL_mixer.spec.in \ - autogen.sh - -libSDL_mixer_la_LDFLAGS = \ - -no-undefined \ - -release $(LT_RELEASE) \ - -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ - -export-symbols-regex Mix_.* -libSDL_mixer_la_LIBADD = $(MIKMOD_LIB) $(TIMIDITY_LIB) $(NATIVE_MIDI_LIB) @SYSTEM_LIBS@ @SDL_LIBS@ - -noinst_PROGRAMS = playwave playmus - -playwave_LDADD = libSDL_mixer.la @SDL_LIBS@ -playmus_LDADD = libSDL_mixer.la @SDL_LIBS@ - -# Rule to build tar-gzipped distribution package -$(PACKAGE)-$(VERSION).tar.gz: distcheck - -# Rule to build RPM distribution package -rpm: $(PACKAGE)-$(VERSION).tar.gz - rpm -ta $(PACKAGE)-$(VERSION).tar.gz - diff --git a/Makefile.wat b/Makefile.wat deleted file mode 100644 index 6679c700..00000000 --- a/Makefile.wat +++ /dev/null @@ -1,75 +0,0 @@ -#============================================================================= -# This is a Watcom makefile to build SDLMIXER.DLL for OS/2 -# -# -#============================================================================= - -dllname=SDLMIXER - -mainobjs = effects_internal.obj effect_position.obj effect_stereoreverse.obj load_aiff.obj load_ogg.obj load_voc.obj mixer.obj music.obj music_cmd.obj music_ogg.obj wavestream.obj -mikmodobjs = mikmod\drv_nos.obj mikmod\drv_sdl.obj mikmod\load_it.obj mikmod\load_mod.obj mikmod\load_s3m.obj mikmod\load_xm.obj mikmod\mdreg.obj mikmod\mdriver.obj mikmod\mloader.obj mikmod\mlreg.obj mikmod\mlutil.obj mikmod\mmalloc.obj mikmod\mmerror.obj mikmod\mmio.obj mikmod\mplayer.obj mikmod\munitrk.obj mikmod\mwav.obj mikmod\npertab.obj mikmod\sloader.obj mikmod\virtch.obj mikmod\virtch2.obj mikmod\virtch_common.obj -timidityobjs = timidity\common.obj timidity\controls.obj timidity\filter.obj timidity\instrum.obj timidity\mix.obj timidity\output.obj timidity\playmidi.obj timidity\readmidi.obj timidity\resample.obj timidity\sdl_a.obj timidity\sdl_c.obj timidity\tables.obj timidity\timidity.obj -oggidecobjs = oggidec\bitwise.obj oggidec\block.obj oggidec\codebook.obj oggidec\floor0.obj oggidec\floor1.obj oggidec\framing.obj oggidec\info.obj oggidec\mapping0.obj oggidec\mdct.obj oggidec\registry.obj oggidec\res012.obj oggidec\sharedbook.obj oggidec\synthesis.obj oggidec\vorbisfile.obj oggidec\window.obj -oggobjs = libogg-1.0\src\bitwise.obj libogg-1.0\src\framing.obj -vorbisobjs = libvorbis-1.0\lib\analysis.obj & - libvorbis-1.0\lib\bitrate.obj & - libvorbis-1.0\lib\block.obj & - libvorbis-1.0\lib\codebook.obj & - libvorbis-1.0\lib\envelope.obj & - libvorbis-1.0\lib\floor0.obj & - libvorbis-1.0\lib\floor1.obj & - libvorbis-1.0\lib\info.obj & - libvorbis-1.0\lib\lookup.obj & - libvorbis-1.0\lib\lpc.obj & - libvorbis-1.0\lib\lsp.obj & - libvorbis-1.0\lib\mapping0.obj & - libvorbis-1.0\lib\mdct.obj & - libvorbis-1.0\lib\psy.obj & - libvorbis-1.0\lib\registry.obj & - libvorbis-1.0\lib\res0.obj & - libvorbis-1.0\lib\sharedbook.obj & - libvorbis-1.0\lib\smallft.obj & - libvorbis-1.0\lib\synthesis.obj & - libvorbis-1.0\lib\vorbisenc.obj & - libvorbis-1.0\lib\vorbisfile.obj & - libvorbis-1.0\lib\window.obj - - -object_files= $(mainobjs) $(mikmodobjs) $(timidityobjs) $(oggidecobjs) - -# Extra stuffs to pass to C compiler: -ExtraCFlags= - -# -#============================================================================== -# -!include Watcom.mif - -.before - @set include=$(%os2tk)\h;$(%include);$(%sdlhome)\include;.\timidity;.\mikmod;.\oggidec; - @cd mikmod - @wmake -h -f Makefile.wat - @cd ..\timidity - @wmake -h -f Makefile.wat - @cd .. - -all : $(dllname).dll $(dllname).lib - -$(dllname).dll : $(object_files) - wlink @$(dllname) - -$(dllname).lib : $(dllname).dll - implib $(dllname).lib $(dllname).dll - -clean : .SYMBOLIC - @if exist *.dll del *.dll - @if exist *.lib del *.lib - @if exist *.obj del *.obj - @if exist *.map del *.map - @if exist *.res del *.res - @if exist *.lst del *.lst - @cd mikmod - @wmake -h -f Makefile.wat clean - @cd ..\timidity - @wmake -h -f Makefile.wat clean - @cd .. diff --git a/SDLMIXER.lnk b/SDLMIXER.lnk deleted file mode 100644 index a7f1be3f..00000000 --- a/SDLMIXER.lnk +++ /dev/null @@ -1,91 +0,0 @@ -#============================================================================= -# This is a linker file to build SDLMIXER.DLL for OS/2 -# -# -#============================================================================= - -system 386 LX DLL INITINSTANCE TERMINSTANCE -name SDLMIXER - -# Object files from \. - -file effects_internal -file effect_position -file effect_stereoreverse -file load_aiff -file load_ogg -file load_voc -file mixer -file music -file music_cmd -file music_ogg -file wavestream - -# Object files from \mikmod - -file mikmod\drv_nos -file mikmod\drv_sdl -file mikmod\load_it -file mikmod\load_mod -file mikmod\load_s3m -file mikmod\load_xm -file mikmod\mdreg -file mikmod\mdriver -file mikmod\mloader -file mikmod\mlreg -file mikmod\mlutil -file mikmod\mmalloc -file mikmod\mmerror -file mikmod\mmio -file mikmod\mplayer -file mikmod\munitrk -file mikmod\mwav -file mikmod\npertab -file mikmod\sloader -file mikmod\virtch -file mikmod\virtch2 -file mikmod\virtch_common - -# Object files from \timidity - -file timidity\common -file timidity\controls -file timidity\filter -file timidity\instrum -file timidity\mix -file timidity\output -file timidity\playmidi -file timidity\readmidi -file timidity\resample -file timidity\sdl_a -file timidity\sdl_c -file timidity\tables -file timidity\timidity - -# Object files from \oggidec - -file oggidec\bitwise.obj -file oggidec\block.obj -file oggidec\codebook.obj -file oggidec\floor0.obj -file oggidec\floor1.obj -file oggidec\framing.obj -file oggidec\info.obj -file oggidec\mapping0.obj -file oggidec\mdct.obj -file oggidec\registry.obj -file oggidec\res012.obj -file oggidec\sharedbook.obj -file oggidec\synthesis.obj -file oggidec\vorbisfile.obj -file oggidec\window.obj - -OPTION MAP=SDLMIXER -OPTION DESCRIPTION 'Simple DirectMedia Layer Mixer v1.2.5' -OPTION ELIMINATE -OPTION MANYAUTODATA -OPTION OSNAME='OS/2 and eComStation' -OPTION SHOWDEAD -LIBPATH %os2tk%\lib -LIBPATH %sdlhome%\src -lib sdl diff --git a/Watcom-EXE.mif b/Watcom-EXE.mif deleted file mode 100644 index 764a652a..00000000 --- a/Watcom-EXE.mif +++ /dev/null @@ -1,30 +0,0 @@ -#============================================================================= -# This file contains the common includes for the -# Watcom makefiles to build EXE applications for OS/2 -# -# -#============================================================================= - -# Create debug build or not? -debug_build=defined - -# -#============================================================================== -# - -!ifdef debug_build -debugflags = -d2 -dDEBUG_BUILD -!else -debugflags = -!endif - -cflags = -zq $(debugflags) -bm -bt=OS2 -5s -fpi -sg -otexan -wx -ei $(ExtraCFlags) - -.extensions: -.extensions: .lib .dll .obj .c .cpp .exe - -.c.obj : .AUTODEPEND - wcc386 $[* $(cflags) - -.cpp.obj : .AUTODEPEND - wpp386 $[* $(cflags) diff --git a/Watcom-OS2.zip b/Watcom-OS2.zip new file mode 100644 index 0000000000000000000000000000000000000000..d39172ea6ddc870d8fb70b4ccec815082b96e7e8 GIT binary patch literal 3968 zcmaKvcTiLNw#P&71TZw|N^epENbk}+gh-QsL0UrSMTJ9EK&2OH2k9ccSLp%=5YPh> zdhZfCQiPXto%^1=do_D9v;Wzjnf=+n^<8Tj>fqsn0000n;OuQC_*6)-Qw9eB5XJ)l zr~tG8J(vsJ!O0aaqz+XV_Jw(wnUVnTzDb*^{qr~T!v`GU9O0B2S-W(KfS$IsEmE>f zbja))Q9qmvHl$v)r6j#wSMM@@7|NZwGlwal&|mGc(N*#A7;f$F@3-|CBE*xcP0@8; z=GZk$ZQ!q?UX~k`{jI#|Vm`28yUd~z{=R4{)TV|B;0;JW zur&L2W{E91>Z2~|u1x*N){Y|Y{nfjQT*YFTfoaAo2)d<=7s9CxS#p~jk4Z<>uFvt9 z`IpdCO{Dam@C3{BrR@9aXJ8qjd#^Q?FQ)E$y)U0C6C|@S6O@8>NN;Sn(zl z008+<@_#KJf^eAa>)=d4v1g}R2DHpNglTQO(+l?+B9r7GB8kts>@+y&TQdpa@OFun3-2Ha+ zWetNad`4u!pwlMb+RX820R!*4Wu-lom|8DRlf&RxeYUio5tT#L=&Lhg108x8;fJ4+ z?>^tLuCN-*{eo5&mRUscN#y-QLy*Q$$rlayqkRjbT|w8|W|aH6HG{Mmr?2z!QzUDp zw){nE9S}y=Tx23aeRIB~a1(~T7tU6k3s4L(WPt6o-h>U4LNTiLn55u6D)2>gtQtHtAG98$_)vUVKp+J-vo9Sf z{ehNL%^k^oP6_lvg6kV!l{61KhE|o=A6m0MeEn;k^F}7}oyV>EK^~eJwHPh$KOO4f zLGkySy1;fGDDH}xZbKrXuV6(vv7YX+{N5wZR-^E&2LDj|p!m6FAaMs~R@a+w*i#gznU0EQ-u+I3Pvaml^lqq+Km%43L_`PHn+lXC4tH^taA&nxw++OCMr zd`qw^OTWNKV@bnv3j2a=c1}x@ZF2R@R9POmmwBhBJuXYg3!l1)=^W;T`>}i0lMGxA z(ZsV3GfZK22{%D@bV#N->6mi=+#S_s?K@J3RoO9>oz5 zAH_gt{75klJkR-)lK{x$X`KZZTYhj= zTV7+ce}&m`WIiRkUbvJ^UZkSf)SSfy04TAAYYy|WcSHOuGZ9V>|2;F~jC8t0K;d%- z0y`6|rkdfAw^XR>A=KR@Q--^+y#B9rdI?PrOTKNjZm3Ch*K-f4Qmze1JDoYDgdV|y z1|gHGZz)2&B#9C7VP?~&N!8hR@D&88jIqhLiHXQjFMtfWtK1>;276; zA)i_Y$cK{1OIpc2ov{PA1@%FJFMIKBXhAmOMNd_q2DZ*xIf=L)L1vbt2_9f$@a{K=JffuQ5`#}?vOpd za~7f~Fj*ODP8AW3-j!WiFZ?4#TT_Fsi0T-WFn*^*8x_2dbMpYX!gD$85iFArQRer~_Uiolx)Itk%|; zilx#3-z&0kHhaK=Kc6Uu_bi3$uFPXRp5FT6*tmL8?&)r$_LkSa!_U7nN%9h&!X4$ZcVoE>8N(<`|KG*@tU8fGm5jFqRWoYC<|PtQZ^1eG`J?_Mu4t1hU+ z%w!0h8sckO@-`?X7?jYV!Hy)=O#MF}qBWMkeaGU_i|WN$xQn9%HYn8}ucm+3!) z>9>uy1-G4sYK=0Y?u1ZR(Dr3~rhHjpSFF$FEEbZMB=2(w988tq)-arl7QI*(?*Kgj zlKgEwE##8?YQhnIpK)DQ5MOA(Q^E2>QfIIz&ID0&JZpq3gyzNM@oPOlU>}QlgoAtm z&vd!+>nGyDt2YFPjEF5QKWjKE0q{H>fk&KWlj^FxFFTEa6-k5rU6dg;`KFOLwQy;6 z=xb{@VTG2hIE$@ink$Wqv*$;m2|8PC9;kw?ck3M3~~Gsu;ia!3$cLP9%rAD zSDyrTj*t4h@O&tznlS?6%4zx@GN*@9C+ItZ;#9SZ(t6cb|7qaL4n=K27rh8|HN@RMr;p*&=)NNj}S=GHMg<4(+UWL5&ZMSS@A#fZdwvVY*kH<~9O z-RvAmL;bS1Nrdm>X?Lz7jhx#s>GjrZiGrnbyT(67qNKlTP@DXswd~Kk@wN92L68;%pF|$CdrG9kRmzsCzVraUhE7zhviC= zUI3m&OA4WkMb6?d?E-7c7G%A!u&8pAnzUYf2@Wagav27z06pp^t;&1)Gd&!pV<8YO z5vxaJ=jxnm=`7#Ty;i=GiPZANAH>I;Ny0NiL<`zf-Yf7p?c*A-JE%@rjr8i& zw`9LahAyAb4;Wl<^M?@FKznos_XV?pa39WvOp>#lT*>Ysj`Tfr4V53b2-Z;%*k3Y# zeW@`0+GWUT-L%Hn{y^gfXh-R;#W)fY^B(8AJN1uM{R>!kv)IJ`XR!UpoiEG>{%d(L z9nM`Mg{AQF!YnO?}Kna(bCyzJ}or0ma#Il^C{$=MkV zzsSI|D)oCO{9v;L$4`LKt%4ij9vW1VXIBer^W=W?uKTgeG5<}ehtW}x5(kR7!@%NG z_VV}?wfJ!N(bzOP^u_JsH>#~3t{(98S3ER(&PPV@50Xi*dJCFATRizyZ_w62!3o~W_|!{!d^#R z-y(iSJ;f6Ljry@u{04J#h1{P!Zw3K|dPzZy?tj$Ip-l#Mp)D zS{wNd=6VtTjJZh$xL(q~p/dev/null 2>&1; then $autoconf && found=true; break; fi +done +if test x$found = xfalse; then + echo "Couldn't find autoconf, aborting" + exit 1 +fi + +# Run configure for this platform echo "Now you are ready to run ./configure" diff --git a/config.guess b/build-scripts/config.guess old mode 100644 new mode 100755 similarity index 81% rename from config.guess rename to build-scripts/config.guess index cc726cd1..17690aea --- a/config.guess +++ b/build-scripts/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2003-02-22' +timestamp='2006-01-02' # 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 @@ -17,13 +17,15 @@ timestamp='2003-02-22' # # 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. +# 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 to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -53,7 +55,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -66,11 +68,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -106,6 +108,7 @@ 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 -q "$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" ; @@ -122,7 +125,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +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) @@ -195,50 +198,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + 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 powerppc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *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 @@ -276,39 +261,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in "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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; 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 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + 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 0;; + 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 0;; + 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 @@ -316,29 +311,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + 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 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + 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 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -347,10 +345,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + 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 @@ -362,10 +360,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + 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 @@ -376,37 +374,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -430,32 +431,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $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 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -471,29 +473,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + 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 0 ;; # Note that: echo "'`uname -s`'" gives '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 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -501,7 +503,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -516,14 +518,18 @@ EOF exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + 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 0 ;; + exit ;; *:AIX:*:[45]) 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 @@ -537,28 +543,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -620,9 +626,19 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + 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 __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -630,11 +646,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -662,147 +678,171 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + 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 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + 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 0 ;; + 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 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; + exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:3*) - echo i586-pc-interix3 - exit 0 ;; + exit ;; + x86:Interix*:[345]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + 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 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) + # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + 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 0 ;; + exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + 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 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -819,8 +859,8 @@ EOF #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 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -838,15 +878,18 @@ EOF #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 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -860,7 +903,7 @@ EOF objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -868,22 +911,28 @@ EOF PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -901,15 +950,15 @@ EOF ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -926,23 +975,29 @@ EOF LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) LIBC=gnu #else LIBC=gnuaout #endif #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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 0 ;; + 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... @@ -950,24 +1005,27 @@ EOF # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + 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 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + 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 @@ -975,15 +1033,16 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + 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 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /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 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*: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) + 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 0 + && { 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 0 ;; + && { 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 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1075,68 +1134,72 @@ EOF else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + 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 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + 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 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1144,22 +1207,25 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1170,25 +1236,47 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + 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 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1220,7 +1308,7 @@ main () #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1309,11 +1397,12 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$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 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1322,22 +1411,22 @@ then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1348,7 +1437,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.sub b/build-scripts/config.sub old mode 100644 new mode 100755 similarity index 87% rename from config.sub rename to build-scripts/config.sub index 277a01d0..a4e8a94a --- a/config.sub +++ b/build-scripts/config.sub @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2003-02-22' +timestamp='2006-01-02' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +21,15 @@ timestamp='2003-02-22' # # 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. - +# 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 ChangeLog entry. # @@ -70,7 +71,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -83,11 +84,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +100,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,7 +119,9 @@ esac # 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* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -144,7 +147,7 @@ case $os in -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) + -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; @@ -169,6 +172,10 @@ case $os in -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/'` @@ -185,6 +192,10 @@ case $os in # 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/'` @@ -228,14 +239,16 @@ case $basic_machine in | 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 \ - | clipper \ + | bfin \ + | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ + | ip2k | iq2000 \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -244,30 +257,37 @@ case $basic_machine in | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | mt \ | msp430 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ - | tahoe | thumb | tic80 | tron \ + | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ + | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -275,6 +295,9 @@ case $basic_machine in ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -295,19 +318,19 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ - | bs2000-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* \ - | m32r-* \ + | ip2k-* | iq2000-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -316,33 +339,40 @@ case $basic_machine in | 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-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -359,6 +389,9 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -373,6 +406,12 @@ case $basic_machine in 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 @@ -432,12 +471,27 @@ case $basic_machine in basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16c) + basic_machine=cr16c-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 ;; @@ -460,6 +514,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -638,10 +696,6 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -654,6 +708,9 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -722,10 +779,6 @@ case $basic_machine in np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp - ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -733,9 +786,12 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -762,24 +818,36 @@ case $basic_machine in 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) + 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-*) + 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 ;; @@ -812,6 +880,10 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -838,6 +910,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; sequent) basic_machine=i386-sequent ;; @@ -845,6 +921,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh64) + basic_machine=sh64-unknown + ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks @@ -919,10 +998,6 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic4x | c4x*) - basic_machine=tic4x-unknown - os=-coff - ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff @@ -948,6 +1023,10 @@ case $basic_machine in tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -991,6 +1070,10 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1021,6 +1104,9 @@ case $basic_machine in romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1037,13 +1123,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1116,19 +1199,23 @@ case $os in | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -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* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -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*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1140,16 +1227,21 @@ case $os in ;; esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -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|'` ;; @@ -1162,6 +1254,9 @@ case $os in -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1183,6 +1278,9 @@ case $os in -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; @@ -1205,6 +1303,9 @@ case $os in -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1241,6 +1342,9 @@ case $os in -kaos*) os=-kaos ;; + -zvmoe) + os=-zvmoe + ;; -none) ;; *) @@ -1272,6 +1376,9 @@ case $basic_machine in arm*-semi) os=-aout ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1315,9 +1422,15 @@ case $basic_machine in *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; @@ -1450,9 +1563,15 @@ case $basic_machine in -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; @@ -1477,7 +1596,7 @@ case $basic_machine in esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build-scripts/install-sh b/build-scripts/install-sh new file mode 100755 index 00000000..1a835340 --- /dev/null +++ b/build-scripts/install-sh @@ -0,0 +1,323 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2005-02-02.21 + +# 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. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +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: +-c (ignored) +-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. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit $?;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit $?;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; 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 + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + 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 "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # 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: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + shift + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # 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 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $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 "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit 1 + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit 1; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); 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-end: "$" +# End: diff --git a/ltmain.sh b/build-scripts/ltmain.sh similarity index 100% rename from ltmain.sh rename to build-scripts/ltmain.sh diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh new file mode 100755 index 00000000..b87c1bf9 --- /dev/null +++ b/build-scripts/makedep.sh @@ -0,0 +1,83 @@ +#!/bin/sh +# +# Generate dependencies from a list of source files + +# Check to make sure our environment variables are set +if test x"$SOURCES" = x -o x"$output" = x; then + echo "SOURCES, and output needs to be set" + exit 1 +fi +cache_prefix=".#$$" + +generate_var() +{ + echo $1 | sed -e 's|^.*/||' -e 's|\.|_|g' +} + +search_deps() +{ + base=`echo $1 | sed 's|/[^/]*$||'` + grep '#include "' <$1 | sed -e 's|.*"\([^"]*\)".*|\1|' | \ + while read file + do cache=${cache_prefix}_`generate_var $file` + if test -f $cache; then + : # We already ahve this cached + else + : >$cache + for path in $base + do dep="$path/$file" + if test -f "$dep"; then + echo " $dep \\" >>$cache + search_deps $dep >>$cache + break + fi + done + fi + cat $cache + done +} + +:>${output}.new +for src in $SOURCES +do echo "Generating dependencies for $src" + ext=`echo $src | sed 's|.*\.\(.*\)|\1|'` + obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"` + echo "\$(objects)/$obj: $src \\" >>${output}.new + search_deps $src | sort | uniq >>${output}.new + case $ext in + c) cat >>${output}.new <<__EOF__ + + \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + +__EOF__ + ;; + cc) cat >>${output}.new <<__EOF__ + + \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + +__EOF__ + ;; + m) cat >>${output}.new <<__EOF__ + + \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + +__EOF__ + ;; + asm) cat >>${output}.new <<__EOF__ + + \$(LIBTOOL) --tag=CC --mode=compile \$(auxdir)/strip_fPIC.sh \$(NASM) $src -o \$@ + +__EOF__ + ;; + S) cat >>${output}.new <<__EOF__ + + \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + +__EOF__ + ;; + *) echo "Unknown file extension: $ext";; + esac + echo "" >>${output}.new +done +mv ${output}.new ${output} +rm -f ${cache_prefix}* diff --git a/build-scripts/mkinstalldirs b/build-scripts/mkinstalldirs new file mode 100755 index 00000000..8ab885ec --- /dev/null +++ b/build-scripts/mkinstalldirs @@ -0,0 +1,99 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case "${1}" in + -h | --help | --h* ) # -h for help + echo "${usage}" 1>&2; exit 0 ;; + -m ) # -m PERM arg + shift + test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } + dirmode="${1}" + shift ;; + -- ) shift; break ;; # stop option processing + -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option + * ) break ;; # first non-opt arg + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in +0) exit 0 ;; +esac + +case $dirmode in +'') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi ;; +*) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 3 +# End: +# mkinstalldirs ends here diff --git a/configure.in b/configure.in index 4507ee3a..524a814d 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ dnl Set various version strings - taken gratefully from the GTk sources # if any functions have been added, set INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set BINARY_AGE and INTERFACE_AGE to 0. - +# MAJOR_VERSION=1 MINOR_VERSION=2 MICRO_VERSION=7 @@ -37,53 +37,75 @@ AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) dnl Detect the canonical build and host environments +AC_CONFIG_AUX_DIRS($srcdir/build-scripts) AC_CANONICAL_HOST -dnl Setup for automake -AM_INIT_AUTOMAKE(SDL_mixer, $VERSION) +dnl Set up the compiler and linker flags +case "$host" in + *-*-cygwin*) + # We build SDL on cygwin without the UNIX emulation layer + BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin" + BASE_LDFLAGS="-mno-cygwin" + ;; + *) + BASE_CFLAGS="-D_GNU_SOURCE=1" + BASE_LDFLAGS="" + ;; +esac +BUILD_CFLAGS="$CFLAGS $CPPFLAGS" +EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS" +BUILD_LDFLAGS="$LDFLAGS" +EXTRA_LDFLAGS="$BASE_LDFLAGS" +for path in /usr/local; do + if test -d $path/include; then + EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include" + fi + if test -d $path/lib; then + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib" + fi +done +CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" +CFLAGS="$CFLAGS $EXTRA_CFLAGS" +LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" dnl Check for tools - -AC_PROG_MAKE_SET -AC_PROG_CC AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL +AC_PROG_LIBTOOL +AC_PROG_CC +AC_PROG_CXX AC_PROG_INSTALL +AC_PROG_MAKE_SET + +dnl Check for compiler characteristics +AC_C_CONST -dnl The alpha architecture needs special flags for binary portability case "$host" in - alpha*-*-linux*) - CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall" - ;; - *-*-beos*) - ac_default_prefix=/boot/develop/tools/gnupro - ;; *-*-cygwin* | *-*-mingw32*) - if test "$build" != "$host"; then # cross-compiling - # Default cross-compile location - ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc - else - # Look for the location of the tools and install there - if test "$BUILD_PREFIX" != ""; then - ac_default_prefix=$BUILD_PREFIX - fi - fi + EXE=".exe" ;; - *-*-darwin*) - AC_DEFINE(MACOSX) - ;; - m68k-atari-mint*) - CFLAGS="$CFLAGS -Dunix" + *) + EXE="" ;; esac +# Standard C sources +SOURCES="$SOURCES \ +$srcdir/effect_position.c \ +$srcdir/effect_stereoreverse.c \ +$srcdir/effects_internal.c \ +$srcdir/load_aiff.c \ +$srcdir/load_voc.c \ +$srcdir/mixer.c \ +$srcdir/music.c" + dnl Check for SDL SDL_VERSION=1.2.4 AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) ) -CFLAGS="$CFLAGS $SDL_CFLAGS" +EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS" +EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SDL_LIBS" dnl Check command-line options @@ -91,13 +113,15 @@ AC_ARG_ENABLE(music-cmd, [ --enable-music-cmd support an external music player [default=yes]], , enable_music_cmd=yes) if test x$enable_music_cmd = xyes; then - CFLAGS="$CFLAGS -DCMD_MUSIC" + SOURCES="$SOURCES $srcdir/music_cmd.c" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DCMD_MUSIC" fi AC_ARG_ENABLE(music-wave, [ --enable-music-wave enable streaming WAVE music [default=yes]], , enable_music_wave=yes) if test x$enable_music_wave = xyes; then - CFLAGS="$CFLAGS -DWAV_MUSIC" + SOURCES="$SOURCES $srcdir/wavestream.c" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DWAV_MUSIC" fi no_libmikmod=yes libmikmod_maj=3 @@ -140,20 +164,20 @@ AC_ARG_ENABLE(music-mod, [ --enable-music-mod enable MOD music via mikmod [default=yes]], , enable_music_mod=$no_libmikmod) if test x$enable_music_mod = xyes; then - CFLAGS="$CFLAGS -DMOD_MUSIC -I\$(top_srcdir)/mikmod" - MUSIC_SUBDIRS="$MUSIC_SUBDIRS mikmod" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DMOD_MUSIC -I\$(srcdir)/mikmod" + SOURCES="$SOURCES $srcdir/mikmod/*.c" fi AC_ARG_ENABLE(music-midi, [ --enable-music-midi enable MIDI music via timidity [default=yes]], , enable_music_midi=yes) if test x$enable_music_midi = xyes; then - CFLAGS="$CFLAGS -DMID_MUSIC" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DMID_MUSIC" AC_ARG_ENABLE(music-timidity-midi, [ --enable-music-timidity-midi enable timidity MIDI output [default=yes]], , enable_music_timidity_midi=yes) if test x$enable_music_timidity_midi = xyes; then - CFLAGS="$CFLAGS -DUSE_TIMIDITY_MIDI -I\$(top_srcdir)/timidity" - MUSIC_SUBDIRS="$MUSIC_SUBDIRS timidity" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_TIMIDITY_MIDI -I\$(srcdir)/timidity" + SOURCES="$SOURCES $srcdir/timidity/*.c" fi AC_ARG_ENABLE(music-native-midi, [ --enable-music-native-midi enable native MIDI music output [default=yes]], @@ -163,16 +187,16 @@ if test x$enable_music_midi = xyes; then case "$host" in *-*-cygwin* | *-*-mingw32*) use_music_native_midi=yes - SYSTEM_LIBS="$SYSTEM_LIBS -lwinmm" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lwinmm" ;; *-*-darwin*) use_music_native_midi=yes - SYSTEM_LIBS="$SYSTEM_LIBS -framework QuickTime" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuickTime" ;; esac if test x$use_music_native_midi = xyes; then - CFLAGS="$CFLAGS -DUSE_NATIVE_MIDI -I\$(top_srcdir)/native_midi" - MUSIC_SUBDIRS="$MUSIC_SUBDIRS native_midi" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_NATIVE_MIDI -I\$(srcdir)/native_midi" + SOURCES="$SOURCES $srcdir/native_midi/*.c" fi fi AC_ARG_ENABLE(music-native-midi-gpl, @@ -186,8 +210,8 @@ if test x$enable_music_midi = xyes; then ;; esac if test x$use_music_native_midi_gpl = xyes; then - CFLAGS="$CFLAGS -DUSE_NATIVE_MIDI -I\$(top_srcdir)/native_midi" - MUSIC_SUBDIRS="$MUSIC_SUBDIRS native_midi_gpl" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_NATIVE_MIDI -I\$(srcdir)/native_midi" + SOURCES="$SOURCES $srcdir/native_midi_gpl/*.c" fi fi fi @@ -205,8 +229,9 @@ if test x$enable_music_ogg = xyes; then ]) AC_MSG_RESULT($have_vorbis) if test x$have_vorbis = xyes; then - CFLAGS="$CFLAGS -DOGG_MUSIC" - SYSTEM_LIBS="$SYSTEM_LIBS -lvorbisfile -lvorbis -logg" + SOURCES="$SOURCE $srcdir/load_ogg.c $srcdir/music_ogg.c" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DOGG_MUSIC" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvorbisfile -lvorbis -logg" fi fi AC_ARG_ENABLE(music-mp3, @@ -216,28 +241,28 @@ if test x$enable_music_mp3 = xyes; then SMPEG_VERSION=0.4.3 AM_PATH_SMPEG($SMPEG_VERSION, have_smpeg=yes, have_smpeg=no) if test x$have_smpeg = xyes; then - CFLAGS="$CFLAGS -DMP3_MUSIC $SMPEG_CFLAGS" - SYSTEM_LIBS="$SYSTEM_LIBS $SMPEG_LIBS" + EXTRA_CFLAGS="$EXTRA_CFLAGS -DMP3_MUSIC $SMPEG_CFLAGS" + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SMPEG_LIBS" fi fi -dnl Add Makefile conditionals -AC_SUBST(MUSIC_SUBDIRS) -AM_CONDITIONAL(USE_MIKMOD, test x$enable_music_mod = xyes) -AM_CONDITIONAL(USE_TIMIDITY, test x$enable_music_timidity_midi = xyes) -AM_CONDITIONAL(USE_NATIVE_MIDI, test x$use_music_native_midi = xyes || test x$use_music_native_midi_gpl = xyes) -AM_CONDITIONAL(USE_NATIVE_MIDI_GPL, test x$use_music_native_midi_gpl = xyes) +OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` -dnl Expand the libraries needed for static and dynamic linking -AC_SUBST(SYSTEM_LIBS) +dnl Expand the sources and objects needed to build the library +AC_SUBST(ac_aux_dir) +AC_SUBST(SOURCES) +AC_SUBST(OBJECTS) +AC_SUBST(BUILD_CFLAGS) +AC_SUBST(EXTRA_CFLAGS) +AC_SUBST(BUILD_LDFLAGS) +AC_SUBST(EXTRA_LDFLAGS) +AC_SUBST(EXE) +AC_SUBST(SDL_CFLAGS) +AC_SUBST(SDL_LIBS) -# Finally create all the generated files AC_OUTPUT([ -Makefile -mikmod/Makefile -timidity/Makefile -native_midi/Makefile -native_midi_gpl/Makefile -SDL_mixer.spec -SDL_mixer.qpg + Makefile SDL_mixer.spec SDL_mixer.qpg +], [ + : >build-deps + if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend ]) diff --git a/mikmod/Makefile.am b/mikmod/Makefile.am deleted file mode 100644 index 89787db2..00000000 --- a/mikmod/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ - -noinst_LTLIBRARIES = libmikmod.la - -libmikmod_la_SOURCES = \ - drv_nos.c \ - load_it.c \ - load_mod.c \ - load_s3m.c \ - load_xm.c \ - mdreg.c \ - mdriver.c \ - mikmod.h \ - mikmod_build.h \ - mikmod_internals.h \ - mloader.c \ - mlreg.c \ - mlutil.c \ - mmalloc.c \ - mmerror.c \ - mmio.c \ - mplayer.c \ - munitrk.c \ - mwav.c \ - npertab.c \ - sloader.c \ - virtch.c \ - virtch2.c \ - virtch_common.c - -EXTRA_DIST = AUTHORS COPYING.LESSER README diff --git a/music_cmd.c b/music_cmd.c index 740e6147..85abd2be 100644 --- a/music_cmd.c +++ b/music_cmd.c @@ -19,12 +19,11 @@ Sam Lantinga slouken@libsdl.org */ - -/* $Id$ */ +#include "SDL_config.h" /* This file supports an external command for playing music */ -#ifdef unix /* This is a UNIX-specific hack */ +#if defined(unix) || defined(__MACOSX__) /* This is a UNIX-specific hack */ #include #include diff --git a/music_cmd.h b/music_cmd.h index d63e0ecb..04a591fb 100644 --- a/music_cmd.h +++ b/music_cmd.h @@ -20,11 +20,9 @@ slouken@libsdl.org */ -/* $Id$ */ - /* This file supports an external command for playing music */ -#ifdef unix /* This is a UNIX-specific hack */ +#if defined(unix) || defined(__MACOSX__) /* This is a UNIX-specific hack */ #include #include diff --git a/native_midi/Makefile.am b/native_midi/Makefile.am deleted file mode 100644 index 37f1a359..00000000 --- a/native_midi/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ - -noinst_LTLIBRARIES = libnativemidi.la - -libnativemidi_la_SOURCES = \ - native_midi.h \ - native_midi_common.c \ - native_midi_common.h \ - native_midi_mac.c \ - native_midi_win32.c - -INCLUDES = -I$(top_srcdir) diff --git a/native_midi/native_midi_common.c b/native_midi/native_midi_common.c index a3816cd6..460c7fb5 100644 --- a/native_midi/native_midi_common.c +++ b/native_midi/native_midi_common.c @@ -23,7 +23,7 @@ #include "native_midi_common.h" -#include "SDL_mixer.h" +#include "../SDL_mixer.h" #include #include diff --git a/native_midi/native_midi_mac.c b/native_midi/native_midi_mac.c index 52fd3e01..e107ce6d 100644 --- a/native_midi/native_midi_mac.c +++ b/native_midi/native_midi_mac.c @@ -19,13 +19,15 @@ Max Horn max@quendi.de */ +#include "SDL_config.h" +#include "SDL_endian.h" -#if defined(macintosh) || defined(MACOSX) +#if __MACOS__ || __MACOSX__ #include "native_midi.h" #include "native_midi_common.h" -#ifdef MACOSX +#if __MACOSX__ #include #else #include @@ -668,7 +670,7 @@ Uint32 *BuildTuneHeader(int part_poly_max[32], int part_to_inst[32], int numPart * as it was written way before the Universal Binary transition. So in the little endian * case, OSSwap is used. */ -#if __LITTLE_ENDIAN__ +#if SDL_BYTEORDER == SDL_LIL_ENDIAN myNoteRequest->info.polyphony.bigEndianValue = OSSwapHostToBigInt16(part_poly_max[part]); myNoteRequest->info.typicalPolyphony.bigEndianValue = OSSwapHostToBigInt32(0x00010000); #else diff --git a/native_midi/native_midi_win32.c b/native_midi/native_midi_win32.c index e7b4d856..23e45e6c 100644 --- a/native_midi/native_midi_win32.c +++ b/native_midi/native_midi_win32.c @@ -19,10 +19,11 @@ Florian 'Proff' Schulze florian.proff.schulze@gmx.net */ +#include "SDL_config.h" /* everything below is currently one very big bad hack ;) Proff */ -#ifdef WIN32 +#if __WIN32__ #define WIN32_LEAN_AND_MEAN #include #include diff --git a/native_midi_gpl/Makefile.am b/native_midi_gpl/Makefile.am deleted file mode 100644 index 8bba6bf6..00000000 --- a/native_midi_gpl/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ - -noinst_LTLIBRARIES = libnativemidi_gpl.la - -libnativemidi_gpl_la_SOURCES = \ - awe_voice.h \ - emumidi.c \ - emumidi.h \ - gmvoices.h \ - gsvoices.h \ - native_midi_gpl.c \ - patchload.c \ - playevents.c \ - playmidi.h \ - readmidi.c - -INCLUDES = -I$(top_srcdir) diff --git a/playmus.lnk b/playmus.lnk deleted file mode 100644 index 111b8950..00000000 --- a/playmus.lnk +++ /dev/null @@ -1,21 +0,0 @@ -#============================================================================= -# This is a linker file to build SDLMIXER test app for OS/2 -# -# -#============================================================================= - -system os2v2 - -file playmus - -OPTION MAP=playmus -OPTION DESCRIPTION 'Simple DirectMedia Layer Mixer v1.2.5 - Test Application' -OPTION ELIMINATE -OPTION MANYAUTODATA -OPTION OSNAME='OS/2 and eComStation' -OPTION SHOWDEAD -LIBPATH %os2tk%\lib -LIBPATH %sdlhome%\src -LIBPATH . -lib sdl -lib sdlmixer diff --git a/playwave.lnk b/playwave.lnk deleted file mode 100644 index 6f6f4e52..00000000 --- a/playwave.lnk +++ /dev/null @@ -1,21 +0,0 @@ -#============================================================================= -# This is a linker file to build SDLMIXER test app for OS/2 -# -# -#============================================================================= - -system os2v2 - -file playwave - -OPTION MAP=playwave -OPTION DESCRIPTION 'Test Application' -OPTION ELIMINATE -OPTION MANYAUTODATA -OPTION OSNAME='OS/2 and eComStation' -OPTION SHOWDEAD -LIBPATH %os2tk%\lib -LIBPATH %sdlhome%\src -LIBPATH . -lib sdl -lib sdlmixer diff --git a/timidity/Makefile.am b/timidity/Makefile.am deleted file mode 100644 index 65bad63d..00000000 --- a/timidity/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ - -noinst_LTLIBRARIES = libtimidity.la - -libtimidity_la_SOURCES = \ - common.c \ - common.h \ - config.h \ - controls.c \ - controls.h \ - filter.c \ - filter.h \ - instrum.c \ - instrum.h \ - mix.c \ - mix.h \ - output.c \ - output.h \ - playmidi.c \ - playmidi.h \ - readmidi.c \ - readmidi.h \ - resample.c \ - resample.h \ - sdl_a.c \ - sdl_c.c \ - tables.c \ - tables.h \ - timidity.c \ - timidity.h - -EXTRA_DIST = FAQ README diff --git a/timidity/config.h b/timidity/config.h index f1a8b737..ac6173b9 100644 --- a/timidity/config.h +++ b/timidity/config.h @@ -19,9 +19,8 @@ /* This is for use with the SDL library */ #define SDL -#if (defined(WIN32) || defined(_WIN32)) && !defined(__WIN32__) -#define __WIN32__ -#endif +#include "SDL_config.h" +#include "SDL_endian.h" /* When a patch file can't be opened, one of these extensions is appended to the filename and the open is tried again. @@ -138,57 +137,6 @@ typedef double FLOAT_T; /* This is enforced by some computations that must fit in an int */ #define MAX_CONTROL_RATIO 255 -#if MACOSX -#undef LITTLE_ENDIAN -#undef BIG_ENDIAN -#define BIG_ENDIAN 1 -#endif - -/* Byte order, defined in for FreeBSD and DEC OSF/1 */ -#ifdef DEC -#include -#endif - -#ifdef linux -/* - * Byte order is defined in as __BYTE_ORDER, that need to - * be checked against __LITTLE_ENDIAN and __BIG_ENDIAN defined in - * includes automagically - * for Linux. - */ -#include - -/* - * We undef the two things to start with a clean situation - * (oddly enough, defines under certain conditions - * the two things below, as __LITTLE_ENDIAN and __BIG_ENDIAN, that - * are useless for our plans) - */ -#undef LITTLE_ENDIAN -#undef BIG_ENDIAN - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define LITTLE_ENDIAN -# elif __BYTE_ORDER == __BIG_ENDIAN -# define BIG_ENDIAN -# else -# error No byte sex defined -# endif -#endif /* linux */ - -/* Win32 on Intel machines */ -#ifdef __WIN32__ -# define LITTLE_ENDIAN -#endif - -#ifdef __OS2__ -# define LITTLE_ENDIAN -#endif - -#ifdef i386 -#define LITTLE_ENDIAN -#endif - typedef unsigned int uint32; typedef int int32; typedef unsigned short uint16; @@ -205,7 +153,7 @@ typedef char int8; (((x)&0xFF0000)>>8) | \ (((x)>>24)&0xFF)) -#ifdef LITTLE_ENDIAN +#if SDL_BYTEORDER == SDL_LIL_ENDIAN #define LE_SHORT(x) x #define LE_LONG(x) x #define BE_SHORT(x) XCHG_SHORT(x) diff --git a/timidity/instrum.c b/timidity/instrum.c index 71da70ab..4c08b0f7 100644 --- a/timidity/instrum.c +++ b/timidity/instrum.c @@ -707,7 +707,7 @@ static InstrumentLayer *load_instrument(char *name, int font_type, int percussio sp->loop_start *= 2; sp->loop_end *= 2; } -#ifndef LITTLE_ENDIAN +#if SDL_BYTEORDER == SDL_BIG_ENDIAN else /* convert to machine byte order */ { diff --git a/timidity/output.h b/timidity/output.h index 865339ab..54db0030 100644 --- a/timidity/output.h +++ b/timidity/output.h @@ -62,7 +62,7 @@ extern void s32tou16x(void *dp, int32 *lp, int32 c); extern void s32toulaw(void *dp, int32 *lp, int32 c); /* little-endian and big-endian specific */ -#ifdef LITTLE_ENDIAN +#if SDL_BYTEORDER == SDL_LIL_ENDIAN #define s32tou16l s32tou16 #define s32tou16b s32tou16x #define s32tos16l s32tos16