#!/bin/bash
 
set +eu
 
if [ -f ./configure ] ; then
    CFLAGS='-g -O2 -DFORTIFY_SOURCE=2 -march=corei7 -mtune=corei7-avx -fstack-protector -fPIC -Werror  -Wall -DDPDK=1 -DDPDK_SHARED_LIB=1 -DDPDK_CRYPTO=0 -DIPSEC=1 -DVCGN=1 -DIPV6SR=1 -I/usr/include/vpp-dpdk' ./configure --with-plugin-toolkit --with-dpdk
else
    if [ -f ../configure ] ; then
        CFLAGS='-g -O2 -DFORTIFY_SOURCE=2 -march=corei7 -mtune=corei7-avx -fstack-protector -fPIC -Werror  -Wall -DDPDK=1 -DDPDK_SHARED_LIB=1 -DDPDK_CRYPTO=0 -DIPSEC=1 -DVCGN=1 -DIPV6SR=1 -I/usr/include/vpp-dpdk' ../configure --with-plugin-toolkit --with-dpdk
    else
        echo Couldnt find ./configure or ../configure 
        exit 1
    fi
fi
