dnl Process this file with autoconf to produce a configure script. dnl The macros which aren't shipped with the autotools are stored in the dnl Tools/config directory in .m4 files. AC_INIT([VisualNaCro],[0.1],[http://libvncserver.sourceforge.net]) AC_PREREQ(2.54) AC_CANONICAL_HOST AM_INIT_AUTOMAKE dnl Checks for programs. AC_CHECK_PROG(SWIG,swig,swig) AC_CHECK_PROG(LIBVNCSERVERCONFIG,libvncserver-config,yes,no) if test "$LIBVNCSERVERCONFIG" != "yes"; then AC_MSG_ERROR([Need to have libvncserver-config in PATH]) exit 1 fi AC_PROG_CC AC_PROG_RANLIB AC_EXEEXT AC_OBJEXT LIBVNCSERVERCFLAGS=`libvncserver-config --cflags` LIBVNCSERVERLIBS=`libvncserver-config --libs` AC_SUBST(LIBVNCSERVERCFLAGS) AC_SUBST(LIBVNCSERVERLIBS) dnl Checks for header files. AC_HEADER_STDC dnl How to specify include directories that may be system directories. # -I should not be used on system directories (GCC) if test "$GCC" = yes; then ISYSTEM="-isystem " else ISYSTEM="-I" fi # Set info about shared libraries. AC_SUBST(SO) AC_SUBST(LDSHARED) AC_SUBST(CCSHARED) AC_SUBST(LINKFORSHARED) # SO is the extension of shared libraries `(including the dot!) AC_MSG_CHECKING(SO) if test -z "$SO" then case $host in *-*-hp*) SO=.sl;; *-*-darwin*) SO=.bundle;; *-*-cygwin* | *-*-mingw*) SO=.dll;; *) SO=.so;; esac fi AC_MSG_RESULT($SO) # LDSHARED is the ld *command* used to create shared library # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5 # (Shared libraries in this instance are shared modules to be loaded into # Python, as opposed to building Python itself as a shared library.) AC_MSG_CHECKING(LDSHARED) if test -z "$LDSHARED" then case $host in *-*-aix*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";; *-*-cygwin* | *-*-mingw*) if test "$GCC" = yes; then LDSHARED="dllwrap --driver-name gcc --dlltool dlltool --export-all-symbols --as as --dllname \$(LIBPREFIX)\$(TARGET)\$(SO)" else if test "cl" = $CC ; then # Microsoft Visual C++ (MSVC) LDSHARED="$CC -nologo -LD" else # Unknown compiler try gcc approach LDSHARED="$CC -shared" fi fi ;; *-*-irix5*) LDSHARED="ld -shared";; *-*-irix6*) LDSHARED="ld ${SGI_ABI} -shared -all";; *-*-sunos4*) LDSHARED="ld";; *-*-solaris*) LDSHARED="ld -G";; *-*-hp*) LDSHARED="ld -b";; *-*-osf*) LDSHARED="ld -shared -expect_unresolved \"*\"";; *-sequent-sysv4) LDSHARED="ld -G";; *-*-next*) if test "$ns_dyld" then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi if test "$with_next_framework" ; then LDSHARED="$LDSHARED \$(LDLIBRARY)" fi ;; *-*-linux*) LDSHARED="gcc -shared";; *-*-dgux*) LDSHARED="ld -G";; *-*-freebsd3*) LDSHARED="gcc -shared";; *-*-freebsd* | *-*-openbsd*) LDSHARED="ld -Bshareable";; *-*-netbsd*) if [[ "`$CC -dM -E - /dev/null` if test "$PERL5DIR" != ""; then dirs="$PERL5DIR $PERL5DIR/CORE" PERL5EXT=none for i in $dirs; do if test -r $i/perl.h; then AC_MSG_RESULT($i) PERL5EXT="$i" break; fi done if test "$PERL5EXT" = none; then PERL5EXT="$PERL5DIR/CORE" AC_MSG_RESULT(could not locate perl.h...using $PERL5EXT) fi AC_MSG_CHECKING(for Perl5 library) PERL5LIB=`($PERL -e 'use Config; $_=$Config{libperl}; s/^lib//; s/$Config{_a}$//; print $_, "\n"') 2>/dev/null` if test "$PERL5LIB" = "" ; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($PERL5LIB) fi AC_MSG_CHECKING(for Perl5 compiler options) PERL5CCFLAGS=`($PERL -e 'use Config; print $Config{ccflags}, "\n"' | sed "s/-I/$ISYSTEM/") 2>/dev/null` if test "$PERL5CCFLAGS" = "" ; then AC_MSG_RESULT(not found) else AC_MSG_RESULT($PERL5CCFLAGS) fi else AC_MSG_RESULT(unable to determine perl5 configuration) PERL5EXT=$PERL5DIR fi else AC_MSG_RESULT(could not figure out how to run perl5) fi # Cygwin (Windows) needs the library for dynamic linking case $host in *-*-cygwin* | *-*-mingw*) PERL5DYNAMICLINKING="-L$PERL5EXT -l$PERL5LIB";; *)PERL5DYNAMICLINKING="";; esac AC_SUBST(PERL) AC_SUBST(PERL5EXT) AC_SUBST(PERL5DYNAMICLINKING) AC_SUBST(PERL5LIB) AC_SUBST(PERL5CCFLAGS) #---------------------------------------------------------------- # Miscellaneous #---------------------------------------------------------------- AC_CONFIG_FILES([Makefile]) AC_OUTPUT dnl configure.in ends here