dnl Process this file with autoconf to produce a configure script. AC_INIT(vnc2swf.c) dnl dirty hack to prevent use of -g in CFLAGS and CXXFLAGS ac_cv_prog_cc_g=no ac_cv_prog_cxx_g=no dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB AC_PROG_MAKE_SET AC_LANG_CPLUSPLUS case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) SOLARIS=yes USE_MITSHM=yes ;; "Linux"*) LINUX=yes USE_MITSHM=yes ;; esac if test "$USE_MITSHM" = yes; then MITSHM_CPPFLAGS="-DMITSHM" fi AC_SUBST(MITSHM_CPPFLAGS) if test "$GCC" = yes; then CFLAGS="$CFLAGS -Wall" if test "$SOLARIS" = yes; then CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wno-implicit-int" fi fi if test "$GXX" = yes; then CXXFLAGS="$CXXFLAGS -Wall" if test "$SOLARIS" = yes; then CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -Wno-implicit-int -fpermissive" fi fi AC_PATH_XTRA dnl zlib is required AC_ARG_WITH(zlib, [ --with-zlib=PATH Use zlib in PATH], [ if test "x$withval" = "xno" ; then AC_MSG_ERROR([*** zlib is required ***]) fi if test -d "$withval/lib"; then if test -n "${need_dash_r}"; then LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" else LDFLAGS="-L${withval}/lib ${LDFLAGS}" fi else if test -n "${need_dash_r}"; then LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" else LDFLAGS="-L${withval} ${LDFLAGS}" fi fi if test -d "$withval/include"; then CPPFLAGS="-I${withval}/include ${CPPFLAGS}" else CPPFLAGS="-I${withval} ${CPPFLAGS}" fi ] ) AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***])) AC_MSG_CHECKING(for socklen_t) AC_TRY_COMPILE( [#include #include ], [socklen_t x; accept(0, 0, &x);], AC_MSG_RESULT(yes) SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=socklen_t', AC_MSG_RESULT(using int) SOCKLEN_T_DEFINE='-DVNC_SOCKLEN_T=int') AC_SUBST(SOCKLEN_T_DEFINE) AC_OUTPUT(Makefile:Makefile.in \ rdr/Makefile:rdr/Makefile.in \ rfb/Makefile:rfb/Makefile.in)