AC_INIT(configure.in) dnl generate config.h from config.h.in AC_CONFIG_HEADER(config.h) dnl replace @extra_includes@ with the value of $extra_includes deduced dnl from the configure script. AC_SUBST(extra_includes) dnl allow the user to specify a directory for extra header files AC_ARG_WITH(extra-includes, [--with-extra-includes=DIR where the extra includes are located ], extra_includes="$withval" ) dnl write a message to indicate we're looking for the argument, and dnl print out the result. AC_MSG_CHECKING("extra includes") AC_MSG_RESULT($withval) dnl use C++ for tests AC_LANG_CPLUSPLUS dnl check for different programs and substitute CC, CXX, INSTALL in Makefile.in AC_PROG_CXX dnl C++ compiler AC_PROG_CC dnl C compiler AC_PROG_INSTALL dnl install program. We must place install-sh in directory. dnl check sizes of data types and write defines in config.h AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long long) dnl look for headers in standard directories AC_CHECK_HEADERS(unistd.h dirent.h) dnl user defined macro to look for QT header AC_FIND_FILE("qglobal.h", [/usr/lib/qt/include /usr/lib/qt-2.1.0/include], qtdir) dnl warn user if header wasn't found if test $qtdir = NO then AC_MSG_WARN([QT header not found]) fi dnl try to compile and run a program. dnl this example tests endianness AC_TRY_RUN([ int main() { short s = 1; short* ptr = &s; unsigned char c = *((char*)ptr); return c; } ] , [ echo "big endian" ] , [ echo "little endian" ] ) dnl write a Makefile. AC_OUTPUT(Makefile)