1dnl Setup library CURRENT, REVISION and AGE 2m4_define([LIBCUR],1) 3m4_define([LIBREV],1) 4m4_define([LIBAGE],0) 5 6dnl Process this file with autoconf to produce a configure script. 7AC_INIT(libsidplay,2.LIBCUR.LIBREV) 8AC_CONFIG_HEADER(unix/config.h) 9AC_CONFIG_SRCDIR(Makefile.am) 10AC_CONFIG_AUX_DIR(unix) 11AM_INIT_AUTOMAKE(no-define) 12 13dnl libtool-style version-info number 14LIBVERSION=LIBCUR:LIBREV:LIBAGE 15AC_SUBST(LIBVERSION) 16 17AC_CANONICAL_HOST 18 19dnl Checks for programs. 20AC_PROG_CC 21AC_PROG_CXX 22 23dnl Initialize libtool. 24AC_LIBTOOL_WIN32_DLL 25AC_PROG_LIBTOOL 26 27dnl Checks for header files. 28AC_HEADER_STDC 29dnl Check for AC99 headers 30AC_CHECK_HEADERS(stdbool.h) 31if test "$ac_cv_header_stdbool_h" = yes; then 32 MY_SUBST_DEF(SID_HAVE_STDBOOL_H) 33else 34 MY_SUBST_UNDEF(SID_HAVE_STDBOOL_H) 35fi 36AC_CREATE_STDINT_H(unix/sidint.h) 37 38dnl Checks for typedefs, structures, and compiler characteristics. 39AC_C_BIGENDIAN 40if test $ac_cv_c_bigendian = yes; then 41 MY_SUBST(SID_WORDS_ENDIANESS,SID_WORDS_BIGENDIAN) 42else 43 MY_SUBST(SID_WORDS_ENDIANESS,SID_WORDS_LITTLEENDIAN) 44fi 45 46AC_CHECK_SIZEOF(char, 1) 47AC_CHECK_SIZEOF(short int, 2) 48AC_CHECK_SIZEOF(int, 4) 49AC_CHECK_SIZEOF(long int, 4) 50 51MY_SUBST(SID_SIZEOF_CHAR,$ac_cv_sizeof_char) 52MY_SUBST(SID_SIZEOF_SHORT_INT,$ac_cv_sizeof_short_int) 53MY_SUBST(SID_SIZEOF_INT,$ac_cv_sizeof_int) 54MY_SUBST(SID_SIZEOF_LONG_INT,$ac_cv_sizeof_long_int) 55 56dnl Checks for library functions. 57AC_CHECK_FUNC(strncasecmp,[AC_DEFINE(HAVE_STRNCASECMP,, 58 [Define if you have the strncasecmp function.])],[]) 59AC_CHECK_FUNC(strcasecmp,[AC_DEFINE(HAVE_STRCASECMP,, 60 [Define if you have the strcasecmp function.])],[]) 61 62AC_SYS_LONG_FILE_NAMES 63 64dnl Use C++ for other tests. 65AC_LANG_CPLUSPLUS 66 67dnl Checks for C++ library functions. 68AC_CHECK_HEADER(sstream,[AC_DEFINE(HAVE_SSTREAM,, 69 [Define if you have the <sstream> header file.])],[]) 70 71dnl Check whether the compiler has bool. 72MY_CHECK_BOOL 73if test "$test_cv_have_bool" = yes; then 74 MY_SUBST_DEF(SID_HAVE_BOOL) 75else 76 MY_SUBST_UNDEF(SID_HAVE_BOOL) 77fi 78 79dnl Check for exceptions. 80MY_CHECK_EXCEPTIONS 81 82dnl Check ANSI C++ ios features 83MY_CHECK_IOS_BIN 84MY_CHECK_IOS_OPENMODE 85 86builders=${libdir}/sidplay/builders 87AC_ARG_WITH(sidbuilders, 88 [ --with-sidbuilders=DIR 89 where the sid builder libraries are to be installed], 90 [builders="$withval"] 91) 92AC_SUBST(builders) 93 94dnl Email addresses 95AH_BOTTOM([/* Email addresses */ 96#define S_A_WHITE_EMAIL "sidplay2@yahoo.com" 97]) 98 99dnl Add absolute directory for header files 100CXXFLAGS="$CXXFLAGS -DHAVE_UNIX -I\$(top_srcdir)/include \ 101-I\$(top_srcdir)/include/sidplay" 102ACLOCAL_AMFLAGS="-I unix" 103AC_SUBST(ACLOCAL_AMFLAGS) 104DEFAULT_INCLUDES= 105AC_SUBST(DEFAULT_INCLUDES) 106 107AC_OUTPUT( 108Makefile \ 109include/Makefile \ 110include/sidplay/Makefile \ 111src/Makefile \ 112src/c64/Makefile \ 113src/mos6510/Makefile \ 114src/mos6526/Makefile \ 115src/mos656x/Makefile \ 116src/sid6526/Makefile \ 117src/sidtune/Makefile \ 118src/xsid/Makefile \ 119unix/Makefile \ 120unix/libsidplay2.spec \ 121unix/libsidplay2.qpg \ 122unix/libsidplay2.pc \ 123unix/sidconfig.h \ 124) 125