AC_INIT([panoglview], [0.2.2]) AC_CONFIG_AUX_DIR(config) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([no-define dist-bzip2 dist-zip]) AC_PROG_CXX AC_ARG_ENABLE(plugin, AC_HELP_STRING([--enable-plugin], [enable the plugin for tuvista (default=no).]) ,, enable_plugin=no) AM_CONDITIONAL(USE_PLUGIN, test "x$enable_plugin" = 'xyes') dnl Search for tuvista if test "x$enable_plugin" = "xyes"; then AC_PATH_PROG(HAVE_TUVISTA, tuvista-config) if test -z "$HAVE_TUVISTA" && test "x$enable_plugin" = "xyes"; then AC_MSG_ERROR([** Coudn't find tuvista-config. You will need it to build the tuvista plugin]) else PLUGIN_CXXFLAGS="$PLUGIN_CXXFLAGS `$HAVE_TUVISTA --cxxflags`" PLUGIN_LDFLAGS="$PLUGIN_LDFLAGS `$HAVE_TUVISTA --libs`" dnl Depending on whether installing the file in a system location or not dnl the corresponding plugin-directory is chosen if test "$INSTALL_FLAG" == 1; then PLUGIN_DIR="`$HAVE_TUVISTA --plugindir`" LOCALE_DIR="`$HAVE_TUVISTA --localedir`" else PLUGIN_DIR="`$HAVE_TUVISTA --noinst-plugindir`" LOCALE_DIR="`$HAVE_TUVISTA --noinst-localedir`" fi fi else PLUGIN_CXXFLAGS="" PLUGIN_LDFLAGS="" PLUGIN_DIR="" LOCALE_DIR="" fi AC_ARG_WITH([unicode], AC_HELP_STRING([--with-unicode=yes/no], [set to 'yes' if you are using unicode wxWidgets library. (default=no)]), [with_unicode=$withval], [with_unicode='yes']) if test "x$with_unicode" = 'xyes' ; then AM_PATH_WXCONFIG(2.4.2, wxWin=1,,, --unicode=yes) else AM_PATH_WXCONFIG(2.4.2, wxWin=1,,, --unicode=no) fi if test "x$wxWin" != x1; then AC_MSG_ERROR([ wxWidgets must be installed on your system but wx-config script couldn't be found. Please check that wx-config is in path, the directory where wxWidgets libraries are installed (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH or equivalent variable and wxWidgets version is 2.4.2 or above. ]) else if test "x$with_unicode" = 'xyes' ; then WX_GL_LIBS="`$WX_CONFIG_PATH --gl-libs`" else WX_GL_LIBS="`$WX_CONFIG_PATH --unicode --gl-libs`" fi AC_SUBST(WX_GL_LIBS) fi case "$host" in *-*-cygwin* | *-*-mingw*) WINBUILD="1" ;; *linux*) WINBUILD="0" ;; esac AM_CONDITIONAL(WIN32_BUILD, test x$WINBUILD = "x1") AC_SUBST(PLUGIN_LDFLAGS) AC_SUBST(PLUGIN_CXXFLAGS) AC_SUBST(PLUGIN_DIR) AM_PROG_LIBTOOL AC_OUTPUT(Makefile src/Makefile)