X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=m4%2Flzo.m4;fp=m4%2Flzo.m4;h=58011f1a57afac18974a1cccc7962a866b14f3e8;hp=0000000000000000000000000000000000000000;hb=4b0e5a03fe89529ebe5d471a82c29c153a12116b;hpb=f238c209f4a0ced889b8fb443753ed2cdb3548b3 diff --git a/m4/lzo.m4 b/m4/lzo.m4 new file mode 100644 index 00000000..58011f1a --- /dev/null +++ b/m4/lzo.m4 @@ -0,0 +1,31 @@ +dnl Check to find the lzo headers/libraries + +AC_DEFUN(tinc_LZO, +[ + tinc_ac_save_CPPFLAGS="$CPPFLAGS" + + AC_ARG_WITH(lzo-include, + [ --with-lzo-include=DIR lzo headers directory], + [lzo_include="$withval" + CFLAGS="$CFLAGS -I$withval" + CPPFLAGS="$CPPFLAGS -I$withval"] + ) + + AC_ARG_WITH(lzo-lib, + [ --with-lzo-lib=DIR lzo library directory], + [lzo_lib="$withval" + LIBS="$LIBS -L$withval"] + ) + + AC_CHECK_HEADERS(lzo1x.h, + [], + [AC_MSG_ERROR("lzo header files not found."); break] + ) + + CPPFLAGS="$tinc_ac_save_CPPFLAGS" + + AC_CHECK_LIB(lzo, lzo1x_1_compress, + [LIBS="$LIBS -llzo"], + [AC_MSG_ERROR("lzo libraries not found.")] + ) +])