+export targetos=$(uname -s)
+export targetarch=
+export amd64=false
+export extra_versioning=false
+export melt_noversion=false
+
+# Define the compiler used in tests (gcc is not installed everywhere)
+: ${CC:=gcc}
+
+# Iterate through arguments
+for i in "$@"
+do
+ case $i in
+ --help ) help=1 ;;
+ --prefix=* ) prefix="${i#--prefix=}" ;;
+ --libdir=* ) libdir="${i#--libdir=}" ;;
+ --datadir=* ) datadir="${i#--datadir=}" ;;
+ --mandir=* ) mandir="${i#--mandir=}" ;;
+ --rename-melt=* ) meltname="${i#--rename-melt=}"; melt_noversion=true ;;
+ --enable-extra-versioning ) extra_versioning=true ;;
+ --enable-debug ) optimisations=false ;;
+ --disable-debug ) debug=false ;;
+ --disable-mmx ) mmx=false; sse=false; sse2=false ;;
+ --disable-sse ) sse=false; sse2=false ;;
+ --disable-sse2 ) sse2=false ;;
+ --enable-gpl ) gpl=true ;;
+ --enable-gpl3 ) gpl3=true ;;
+ --arch=* ) arch="${i#--arch=}" ;;
+ --cpu=* ) cpu="${i#--cpu=}" ;;
+ --target-os=* ) targetos="${i#--target-os=}" ;;
+ --target-arch=* ) targetarch="${i#--target-arch=}" ;;
+ esac
+done
+
+if [ -z "${meltname}" ]
+then
+ if [ "$extra_versioning" = "false" ]
+ then
+ meltname=melt
+ else
+ meltname=melt${soversion}
+ fi
+fi