[axel-commits] r118 - in /trunk: CHANGES Makefile configure

phihag-guest at users.alioth.debian.org phihag-guest at users.alioth.debian.org
Wed Jan 6 12:40:50 UTC 2010


Author: phihag-guest
Date: Wed Jan  6 12:40:49 2010
New Revision: 118

URL: http://svn.debian.org/wsvn/axel/?sc=1&rev=118
Log:
Add HP-UX, fix Solaris support (Fixes: #312092)

Modified:
    trunk/CHANGES
    trunk/Makefile
    trunk/configure

Modified: trunk/CHANGES
URL: http://svn.debian.org/wsvn/axel/trunk/CHANGES?rev=118&op=diff
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed Jan  6 12:40:49 2010
@@ -1,4 +1,7 @@
 UNRELEASED:
+
+- Make axel build on HP-UX, thanks Ciro Iriarte
+- Fix Solaris support, thanks Sebastian Kayser
 
 Version 2.4
 

Modified: trunk/Makefile
URL: http://svn.debian.org/wsvn/axel/trunk/Makefile?rev=118&op=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Wed Jan  6 12:40:49 2010
@@ -3,7 +3,6 @@
 ##                       ##
 ## Copyright 2001 Lintux ##
 ###########################
-
 
 ### DEFINITIONS
 
@@ -18,12 +17,6 @@
 all: $(OUTFILE)
 install: install-bin install-etc install-man
 uninstall: uninstall-bin uninstall-etc uninstall-man
-
-ifdef I18N
-all: $(MOFILES)
-install: install-i18n
-uninstall: uninstall-i18n
-endif
 
 clean:
 	rm -f *.o $(OUTFILE) search core *.mo
@@ -52,12 +45,10 @@
 
 $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
 	$(CC) *.o -o $(OUTFILE) $(LFLAGS)
-ifndef DEBUG
-	-$(STRIP) $(OUTFILE)
-endif
+	$(STRIP) $(OUTFILE)
 
 .c.o:
-	$(CC) -c $*.c -o $*.o -Wall $(CFLAGS)
+	$(CC) -c $*.c -o $*.o $(CFLAGS)
 
 install-bin:
 	mkdir -p $(DESTDIR)$(BINDIR)/
@@ -67,7 +58,7 @@
 	rm -f $(BINDIR)/$(OUTFILE)
 
 tar:
-	version=$$(sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h) && \
+	version=`sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h` && \
 	tar --create --numeric-owner --owner 0 --group 0 --transform "s#^#axel-$${version}/#" "--file=axel-$${version}.tar" --exclude-vcs -- *.c *.h *.po *.1 configure Makefile axelrc.example gui API CHANGES COPYING CREDITS README && \
 	gzip --best < "axel-$${version}.tar" > "axel-$${version}.tar.gz" && \
 	bzip2 --best < "axel-$${version}.tar" > "axel-$${version}.tar.bz2"
@@ -88,6 +79,8 @@
 .po.mo: $@.po
 	msgfmt -vo $@ $*.po
 
+i18n-mofiles: $(MOFILES)
+
 install-i18n:
 	@echo Installing locale files...
 	@for i in $(MOFILES); do \

Modified: trunk/configure
URL: http://svn.debian.org/wsvn/axel/trunk/configure?rev=118&op=diff
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Wed Jan  6 12:40:49 2010
@@ -73,7 +73,6 @@
 ARCH=$arch
 
 DESTDIR=
-LFLAGS=
 
 EOF
 
@@ -87,6 +86,8 @@
 
 EOF
 
+AXEL_LFLAGS=${LFLAGS}
+
 if [ "$i18n" = "1" ]; then
 	if type msgfmt > /dev/null 2> /dev/null; then :;else
 		echo 'WARNING: Internationalization disabled, you don'\''t have the necessary files'
@@ -94,11 +95,15 @@
 		echo ''
 		i18n=0;
 	fi;
-fi
-
-echo "CFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os ${CFLAGS}" >> Makefile.settings
+	
+	echo "all: i18n-mofiles" >> Makefile.settings
+	echo "install: install-i18n" >> Makefile.settings
+	echo "uninstall: uninstall-i18n" >> Makefile.settings
+fi
+
+AXEL_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os ${CFLAGS}"
 if [ "$debug" = "1" ]; then
-	echo 'CFLAGS+=-g' >> Makefile.settings
+	AXEL_CFLAGS="${AXEL_CFLAGS} -g"
 	echo 'DEBUG=1' >> Makefile.settings
 	echo '#define DEBUG' >> config.h;
 fi
@@ -106,16 +111,23 @@
 if [ "$i18n" = "1" ]; then
 	echo 'I18N=1' >> Makefile.settings
 	echo '#define I18N' >> config.h
-	if cat /usr/local/include/libintl.h > /dev/null 2> /dev/null; then
-		echo 'CFLAGS+=-I/usr/local/include' >> Makefile.settings
-		echo 'LFLAGS+=-L/usr/local/lib' >> Makefile.settings;
-	fi;
+	if [ -f /usr/local/include/libintl.h ]; then
+		AXEL_CFLAGS="${AXEL_CFLAGS} -I/usr/local/include"
+		AXEL_LFLAGS="${AXEL_LFLAGS} -L/usr/local/lib"
+	elif [ -f /opt/csw/include/libintl.h ]; then
+		AXEL_CFLAGS="${AXEL_CFLAGS} -I/opt/csw/include"
+		AXEL_LFLAGS="${AXEL_LFLAGS} -L/opt/csw/lib"
+	elif [ -f "${prefix}/include/libintl.h" ]; then
+		AXEL_CFLAGS="${AXEL_CFLAGS} -I${prefix}/include"
+		AXEL_LFLAGS="${AXEL_LFLAGS} -L${prefix}/lib"
+	fi
 fi
 
 if [ "${CC}" != "" ]; then
 	echo "CC=${CC}" >> Makefile.settings;
 elif type gcc > /dev/null 2> /dev/null; then
 	echo "CC=gcc" >> Makefile.settings;
+	AXEL_CFLAGS="${AXEL_CFLAGS} -Wall"
 elif type cc > /dev/null 2> /dev/null; then
 	echo "CC=cc" >> Makefile.settings;
 else
@@ -126,9 +138,6 @@
 if [ "$strip" = 0 ]; then
 	echo "STRIP=\# skip strip" >> Makefile.settings;
 else
-	echo 'The strip option is enabled. This should not be a problem usually, but on some'
-	echo 'systems it breaks stuff.'
-	echo
 	if [ "$debug" = 1 ]; then
 		echo 'Stripping binaries does not make sense when debugging. Stripping disabled.'
 		echo
@@ -136,7 +145,7 @@
 		strip=0;
 	elif type strip > /dev/null 2> /dev/null; then
 		echo "STRIP=strip" >> Makefile.settings;
-	elif /bin/test -x /usr/ccs/bin/strip; then
+	elif [ -x /usr/ccs/bin/strip ]; then
 		echo "STRIP=/usr/ccs/bin/strip" >> Makefile.settings;
 	else
 		echo 'No strip utility found, cannot remove unnecessary parts from executable.'
@@ -149,81 +158,83 @@
 case "$arch" in
 FreeBSD )
 	echo '#define NOGETOPTLONG' >> config.h
-	echo 'LFLAGS+=-pthread' >> Makefile.settings
-	if [ "$i18n" = "1" ]; then
-		echo 'LFLAGS+=-lintl' >> Makefile.settings;
-	fi
-	echo 'Please keep in mind that you need GNU make to make Axel!'
-	echo ''
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread"
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl"
+	fi
 ;;
 OpenBSD )
 	echo '#define NOGETOPTLONG' >> config.h
-	echo 'LFLAGS+=-pthread' >> Makefile.settings
-	if [ "$i18n" = "1" ]; then
-		echo 'LFLAGS+=-lintl' >> Makefile.settings;
-	fi
-	echo 'Please keep in mind that you need GNU make to make Axel!'
-	echo ''
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread"
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl"
+	fi
 ;;
 NetBSD )
 	echo 'WARNING: NetBSD not tested! Using OpenBSD settings.'
-	echo '         Please send me your results so I can update this!'
-	echo ''
-	echo '#define NOGETOPTLONG' >> config.h
-	echo 'LFLAGS+=-pthread' >> Makefile.settings
-	if [ "$i18n" = "1" ]; then
-		echo 'LFLAGS+=-lintl' >> Makefile.settings;
-	fi
-	echo 'Please keep in mind that you need GNU make to make Axel!'
-	echo ''
+	echo '#define NOGETOPTLONG' >> config.h
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread"
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl"
+	fi
 ;;
 Darwin )
 	echo '#define NOGETOPTLONG' >> config.h
-	echo 'LFLAGS+=-lpthread' >> Makefile.settings
-	if [ "$i18n" = "1" ]; then
-		echo 'LFLAGS+=-lintl' >> Makefile.settings;
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread"
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl"
 	fi
 	echo '#define DARWIN' >> config.h
-	echo 'Please keep in mind that you need GNU make to make Axel!'
-	echo ''
 ;;
 Linux | GNU/kFreeBSD)
-	echo 'LFLAGS+=-lpthread' >> Makefile.settings
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread"
 ;;
 SunOS )
 	echo '#define NOGETOPTLONG' >> config.h
 	echo '#define BSD_COMP' >> config.h
-	echo 'LFLAGS+=-lpthread -lsocket -lnsl' >> Makefile.settings
-	if [ "$i18n" = "1" ]; then
-		echo 'LFLAGS+=-lintl' >> Makefile.settings;
-	fi
-	echo 'Please keep in mind that you need GNU make to make Axel!'
-	echo ''
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread -lsocket -lnsl"
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl"
+	fi
+;;
+HP-UX )
+	echo '#define NOGETOPTLONG' >> config.h
+	AXEL_LFLAGS="${AXEL_LFLAGS} -lpthread"
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl"
+	
+		if [ -d /usr/local/lib/hpux32 ]; then
+			AXEL_LFLAGS="${AXEL_LFLAGS} -L/usr/local/lib/hpux32"
+		fi
+	fi
 ;;
 CYGWIN_* )
-	echo 'LFLAGS+=-lpthread' >> Makefile.settings
-	if [ "$i18n" = "1" ]; then
-		echo 'LFLAGS+=-lintl' >> Makefile.settings;
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread"
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl"
 	fi
 	echo 'OUTFILE=axel.exe' >> Makefile.settings
 ;;
 * )
-	echo 'LFLAGS+=-lpthread' >> Makefile.settings
-	echo '#define NOGETOPTLONG' >> config.h
-	if [ "$i18n" = "1" ]; then
-		echo 'LFLAGS+=-lintl' >> Makefile.settings;
+	AXEL_LFLAGS="${AXEL_LFLAGS} -pthread"
+	echo '#define NOGETOPTLONG' >> config.h
+	if [ "$i18n" = "1" ]; then
+		AXEL_LFLAGS="${AXEL_LFLAGS} -lintl";
 	fi
 	echo 'WARNING: This architecture is unknown!'
 	echo ''
-	echo 'That does not mean Axel will not work, it just means I'\''ve never had the chance'
-	echo 'to test Axel on it. It'\''d be a great help if you could send me more information'
-	echo 'about your platform so I can add it to the build tools.'
+	echo 'That does not mean Axel will not work, it just means Axel is not tested on it.'
+	echo 'It'\''d be a great help if you could send me more information'
+	echo 'about your platform so that it can be addedto the build tools.'
 	echo 'You can try to build the program now, if you wish, this default setup might'
 	echo 'just work.'
 	echo ''
 ;;
 esac
 
+echo "CFLAGS=${AXEL_CFLAGS}" >> Makefile.settings
+echo "LFLAGS=${AXEL_LFLAGS}" >> Makefile.settings
+
 echo 'Configuration done:'
 if [ "$i18n" = "1" ]; then
 	echo '  Internationalization enabled.';




More information about the axel-commits mailing list