]> git.stg.codes - stg.git/commitdiff
Merge branch 'stg-2.409' into stg-2.409-radius
authorMaxim Mamontov <madf@madf.info>
Sun, 13 Nov 2016 02:16:23 +0000 (21:16 -0500)
committerMaxim Mamontov <madf@madf.info>
Sun, 13 Nov 2016 02:16:23 +0000 (21:16 -0500)
1  2 
projects/stargazer/build

diff --combined projects/stargazer/build
index a43e3e13d8c6331cc3f94aebe7a560e8a0afaf3b,1fbb8a98d86b21b618c235ee9bcc87463215baa6..5c2faf268f8d2417c27ca78822c51ae89c5b6037
@@@ -105,6 -105,7 +105,6 @@@ PLUGINS="authorization/a
           configuration/sgconfig
           other/ping
           other/rscript
 -         other/radius
           other/smux
           store/files
           capture/cap_nf"
@@@ -131,7 -132,6 +131,6 @@@ els
              then
                  DEFS="$DEFS -DDARWIN"
                  LIB_THREAD=-lpthread
-                 LIBICONV=""
              else
                  LIB_THREAD=-lc_r
              fi
@@@ -418,55 -418,6 +417,55 @@@ els
  fi
  rm -f fake
  
 +printf "Checking for -lyajl... "
 +pkg-config --version > /dev/null 2> /dev/null
 +if [ "$?" = "0" ]
 +then
 +    pkg-config --atleast-version=2.0.0 yajl
 +    if [ "$?" != "0" ]
 +    then
 +        CHECK_YAJL=no
 +        printf "no\n"
 +    else
 +        CHECK_YAJL=yes
 +        printf `pkg-config --modversion yajl`"\n"
 +    fi
 +else
 +    printf "#include <stdio.h>\n" > build_check.c
 +    printf "#include <yajl/yajl_version.h>\n" >> build_check.c
 +    printf "int main() { printf(\"%%d\", yajl_version()); return 0; }\n" >> build_check.c
 +    $CC $CFLAGS $LDFLAGS build_check.c -lyajl -o fake > /dev/null 2> /dev/null
 +    if [ $? != 0 ]
 +    then
 +        CHECK_YAJL=no
 +        printf "no\n"
 +    else
 +        YAJL_VERSION=`./fake`
 +        if [ $YAJL_VERSION -ge 20000 ]
 +        then
 +            CHECK_YAJL=yes
 +            printf "${YAJL_VERSION}\n"
 +        else
 +            CHECK_YAJL=no
 +            printf "no. Need at least version 2.0.0, existing version is ${YAJL_VERSION}\n"
 +        fi
 +    fi
 +    rm -f fake
 +fi
 +
 +printf "Checking for boost::scoped_ptr... "
 +printf "#include <boost/scoped_ptr.hpp>\nint main() { boost::scoped_ptr<int> test(new int(1)); return 0; }\n" > build_check.cpp
 +$CXX $CXXFLAGS $LDFLAGS build_check.cpp -o fake # > /dev/null 2> /dev/null
 +if [ $? != 0 ]
 +then
 +    CHECK_BOOST_SCOPED_PTR=no
 +    printf "no\n"
 +else
 +    CHECK_BOOST_SCOPED_PTR=yes
 +    printf "yes\n"
 +fi
 +rm -f fake
 +
  if [ "$OS" = "linux" ]
  then
      printf "Checking for linux/netfilter_ipv4/ip_queue.h... "
  fi
  
  rm -f build_check.c
 +rm -f build_check.cpp
  
  if [ "$CHECK_EXPAT" != "yes" ]
  then
@@@ -529,14 -479,6 +528,14 @@@ the
               capture/nfqueue"
  fi
  
 +if [ "$CHECK_YAJL" = "yes" -a "$CHECK_BOOST_SCOPED_PTR" = "yes" ]
 +then
 +    PLUGINS="$PLUGINS
 +             other/radius"
 +    STG_LIBS="$STG_LIBS
 +              json.lib"
 +fi
 +
  printf "OS=$OS\n" > $CONFFILE
  printf "STG_TIME=yes\n" >> $CONFFILE
  printf "DEBUG=$DEBUG\n" >> $CONFFILE