]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Update configure script
authorArran Cudbard-Bell <a.cudbardb@gmail.com>
Sat, 27 Oct 2012 20:21:52 +0000 (22:21 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 27 Oct 2012 21:35:35 +0000 (22:35 +0100)
configure

index f1cf69b130a18a952611f86b4bb80a44f4279b21..cf281a77b0284642e8dec63b647fe6acf3efb04e 100755 (executable)
--- a/configure
+++ b/configure
@@ -613,7 +613,10 @@ ac_includes_default="\
 enable_option_checking=no
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+RADIUSD_VERSION_COMMIT
+RADIUSD_VERSION_STRING
 RADIUSD_VERSION
+RADIUSD_INCRM_VERSION
 RADIUSD_MINOR_VERSION
 RADIUSD_MAJOR_VERSION
 STATIC_MODULES
@@ -675,6 +678,7 @@ build_vendor
 build_cpu
 build
 LIBTOOL
+GIT
 MAKE
 GMAKE
 RANLIB
@@ -2441,9 +2445,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ac_config_headers="$ac_config_headers src/include/autoconf.h"
 
 
-RADIUSD_VERSION=`cat VERSION`
+
 RADIUSD_MAJOR_VERSION=`cat VERSION | sed 's/\..*//'`
-RADIUSD_MINOR_VERSION=`cat VERSION | sed 's/^3\.//'`
+RADIUSD_MINOR_VERSION=`cat VERSION | sed 's/^\^\.\*\.//' | sed 's/\..*$//'`
+RADIUSD_INCRM_VERSION=`cat VERSION | sed 's/^.*\..*\.//' | sed 's/-.*$//'`
+
+RADIUSD_VERSION=`echo | awk -v major="$RADIUSD_MAJOR_VERSION" \
+-v minor="$RADIUSD_MINOR_VERSION" \
+-v incrm="$RADIUSD_INCRM_VERSION" \
+'{ printf "%02i%02i%02i", major, minor, incrm }'`
+
+RADIUSD_VERSION_STRING=`cat VERSION`
 PACKAGE=freeradius
 
 
@@ -4671,6 +4683,45 @@ if test -z "$makever"; then
                from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing." "$LINENO" 5
 fi
 
+# Extract the first word of "git", so it can be a program name with args.
+set dummy git; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_GIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$GIT"; then
+  ac_cv_prog_GIT="$GIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_GIT="yes"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_GIT" && ac_cv_prog_GIT="no"
+fi
+fi
+GIT=$ac_cv_prog_GIT
+if test -n "$GIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5
+$as_echo "$GIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
 
 # Check whether --with-system-libltdl was given.
 if test "${with_system_libltdl+set}" = set; then :
@@ -15362,12 +15413,14 @@ if test "${enable_developer+set}" = set; then :
 fi
 
 
-if test "x$developer" != "xno" -a -d $srcdir/CVS; then
-    developer="yes"
-fi
+if test -d $srcdir/.git; then
+  if test "x$developer" != "xno"; then
+        developer="yes"
+  fi
 
-if test "x$developer" != "xno" -a -d $srcdir/.git; then
-    developer="yes"
+    if test $GIT = yes; then
+       RADIUSD_VERSION_COMMIT=`git log --pretty=format:'%h' -n 1`
+  fi
 fi
 
 EXPERIMENTAL=
@@ -18391,6 +18444,9 @@ USE_STATIC_LIBS=$enable_static
 
 
 
+
+
+
   unset ac_cv_env_LIBS_set
   unset ac_cv_env_LIBS_value