#!/bin/sh # Using this script should be identical to the resulto of "autoreconf -fi". # Some code taken from the gnome macros/autogen.sh scripts. # $Id$ ############################################################################### # utility functions ############################################################################### # Not all echo versions allow -n, so we check what is possible. This test is # based on the one in autoconf. ECHO_C= ECHO_N= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ;; *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac # some terminal codes ... boldface="`tput bold 2>/dev/null`" normal="`tput sgr0 2>/dev/null`" printbold() { echo $ECHO_N "$boldface" $ECHO_C echo "$@" echo $ECHO_N "$normal" $ECHO_C } printerr() { echo "$@" >&2 } # Usage: # compare_versions MIN_VERSION ACTUAL_VERSION # returns true if ACTUAL_VERSION >= MIN_VERSION compare_versions() { ch_min_version=$1 ch_actual_version=$2 ch_status=0 IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." set $ch_actual_version for ch_min in $ch_min_version; do ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes if [ -z "$ch_min" ]; then break; fi if [ -z "$ch_cur" ]; then ch_status=1; break; fi if [ $ch_cur -gt $ch_min ]; then break; fi if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi done IFS="$ch_save_IFS" return $ch_status } # Usage: # version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION # checks to see if the package is available version_check() { vc_package=$1 vc_variable=$2 vc_checkprogs=$3 vc_min_version=$4 vc_status=1 vc_checkprog=`eval echo "\\$$vc_variable"` if [ -n "$vc_checkprog" ]; then printbold "Using $vc_checkprog for $vc_package" return 0 fi vc_comparator=">=" printbold "Checking for $vc_package $vc_comparator $vc_min_version..." for vc_checkprog in $vc_checkprogs; do echo $ECHO_N " testing $vc_checkprog... " $ECHO_C if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then vc_actual_version=`$vc_checkprog --version | head -n 1 | \ sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` if compare_versions $vc_min_version $vc_actual_version; then echo "found $vc_actual_version" # set variables eval "$vc_variable=$vc_checkprog; \ ${vc_variable}_VERSION=$vc_actual_version" vc_status=0 break else echo "too old (found version $vc_actual_version)" fi else echo "not found." fi done if [ "$vc_status" != 0 ]; then printerr "***Error***: $vc_package $vc_comparator $vc_min_version not found." fi return $vc_status } ############################################################################### # main section ############################################################################### configure_ac="configure.ac" (test -f $configure_ac && test -f src/torrent.cpp) || { printerr "***Error***: Run this script from the top-level source directory." exit 1 } echo printbold "Bootstrapping autotools for libtorrent-rasterbar" echo REQUIRED_AUTOCONF_VERSION=`cat $configure_ac | grep '^AC_PREREQ' | sed -n -e 's/AC_PREREQ(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` REQUIRED_AUTOMAKE_VERSION=`cat configure.ac | grep '^AM_INIT_AUTOMAKE' | sed -n -e 's/AM_INIT_AUTHTTP/1.1 200 OK Connection: close Cache-Control: public, max-age=21600, no-transform Content-Disposition: inline; filename="autotool.sh"; filename*=UTF-8''autotool.sh Etag: "5aa0cac4c16947f2a07c87cd059f4d965fbaa851" X-Content-Type-Options: nosniff Date: Wed, 23 Jul 2025 19:16:22 GMT Access-Control-Expose-Headers: Content-Disposition Content-Type: text/plain; charset=utf-8 Last-Modified: Mon, 19 Nov 2012 05:23:46 GMT Content-Length: 5605 Set-Cookie: i_like_gitea=d626334e319521c5; Path=/; HttpOnly; Secure; SameSite=Lax Set-Cookie: _csrf=pF5aVkU5UYo6KL_KuXwTChVzgp06MTc1MzI5ODE4MjUxNTc4NTgwOQ; Path=/; Max-Age=86400; HttpOnly; Secure; SameSite=Lax X-Frame-Options: SAMEORIGIN X-Cache-Status: HIT X-Cache-Age: 0 #!/bin/sh # Using this script should be identical to the resulto of "autoreconf -fi". # Some code taken from the gnome macros/autogen.sh scripts. # $Id$ ############################################################################### # utility functions ############################################################################### # Not all echo versions allow -n, so we check what is possible. This test is # based on the one in autoconf. ECHO_C= ECHO_N= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ;; *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac # some terminal codes ... boldface="`tput bold 2>/dev/null`" normal="`tput sgr0 2>/dev/null`" printbold() { echo $ECHO_N "$boldface" $ECHO_C echo "$@" echo $ECHO_N "$normal" $ECHO_C } printerr() { echo "$@" >&2 } # Usage: # compare_versions MIN_VERSION ACTUAL_VERSION # returns true if ACTUAL_VERSION >= MIN_VERSION compare_versions() { ch_min_version=$1 ch_actual_version=$2 ch_status=0 IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." set $ch_actual_version for ch_min in $ch_min_version; do ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes if [ -z "$ch_min" ]; then break; fi if [ -z "$ch_cur" ]; then ch_status=1; break; fi if [ $ch_cur -gt $ch_min ]; then break; fi if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi done IFS="$ch_save_IFS" return $ch_status } # Usage: # version_check PACKAGE VARIABLE