diff --git a/configure.ac b/configure.ac index 57a8eb693..409eccfba 100644 --- a/configure.ac +++ b/configure.ac @@ -207,7 +207,12 @@ AC_MSG_ERROR("SAI headers API version and library version mismatch")])]) CXXFLAGS="$SAVED_FLAGS" ])]) +AM_COND_IF([SYNCD], [ +SAVED_FLAGS="$CXXFLAGS" +CXXFLAGS="-Xlinker --no-as-needed -lsai -I$srcdir/SAI/inc -I$srcdir/SAI/experimental -I$srcdir/SAI/meta" AC_CHECK_FUNCS(sai_bulk_object_clear_stats sai_bulk_object_get_stats) +CXXFLAGS="$SAVED_FLAGS" +]) AC_OUTPUT(Makefile meta/Makefile diff --git a/syncd/VendorSai.cpp b/syncd/VendorSai.cpp index 6d44b6eaf..5ee669c41 100644 --- a/syncd/VendorSai.cpp +++ b/syncd/VendorSai.cpp @@ -1,3 +1,4 @@ +#include "config.h" #include "VendorSai.h" #include "meta/sai_serialize.h"