Mercurial > audlegacy
changeset 2612:ba44276ecdc8 trunk
[svn] remove autotools macros that aren't used in audacious core any more
author | kiyoshi |
---|---|
date | Tue, 06 Mar 2007 19:04:48 -0800 |
parents | dd7a24edc9f6 |
children | 0280eb67fd5d |
files | ChangeLog m4/amidi-plug.m4 m4/arts.m4 m4/jack.m4 m4/libFLAC.m4 m4/libmikmod.m4 m4/lirc.m4 m4/sdl.m4 m4/sidplay.m4 src/audacious/build_stamp.c |
diffstat | 10 files changed, 10 insertions(+), 1398 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Mar 06 18:54:10 2007 -0800 +++ b/ChangeLog Tue Mar 06 19:04:48 2007 -0800 @@ -1,3 +1,12 @@ +2007-03-07 02:54:10 +0000 Kiyoshi Aman <kiyoshi.aman@gmail.com> + revision [4232] + why are we still checking for GConf? checks and related OMK data removed + + trunk/configure.ac | 22 ---------------------- + trunk/mk/rules.mk.in | 4 ---- + 2 files changed, 26 deletions(-) + + 2007-03-06 01:30:33 +0000 Giacomo Lozito <james@develia.org> revision [4230] - made progress bar in fileinfo popup work again; it's ok to do code cleaning/beautifying but please, do ensure and test that things work as they should
--- a/m4/amidi-plug.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -# Checks for amidi-plug - -dnl AM_PATH_AMIDIPLUG_HWSYNTH([ACTION-IF-FOUND , ACTION-IF-NOT-FOUND]) -dnl Test for ALSA-supported hardware synth -dnl -AC_DEFUN([AM_PATH_AMIDIPLUG_HWSYNTH], -[ - -AMIDIPLUG_EVERYTHINGOK="yes" - -dnl **** Search for a hardware synth (ALSA managed) **** -AC_CHECK_FILE([/proc/asound/card0/wavetableD1], - [ap_hwsynth_found=yes], [ap_hwsynth_found=no]) -if test "x$ap_hwsynth_found" = "xno"; then - AC_CHECK_FILE([/proc/asound/card1/wavetableD1], - [ap_hwsynth_found=yes], [ap_hwsynth_found=no]) - if test "x$ap_hwsynth_found" = "xno"; then - AC_CHECK_FILE([/proc/asound/card2/wavetableD1], - [ap_hwsynth_found=yes], [ap_hwsynth_found=no]) - if test "x$ap_hwsynth_found" = "xno"; then - AMIDIPLUG_EVERYTHINGOK="no" - AC_MSG_WARN([*** Could not find an ALSA-supported hardware synth, amidi-plug won't be compiled. If you wish to compile it anyway, use --enable-amidiplug in configure. ***]) - fi - fi -fi - -if test "x$AMIDIPLUG_EVERYTHINGOK" = "xyes"; then - ifelse([$1], , :, [$1]) -else - ifelse([$2], , :, [$2]) -fi - -])
--- a/m4/arts.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -# CFLAGS and library paths for aRts -# written 15 December 1999 by Ben Gertzfield <che@debian.org> -# hacked for artsc by Haavard Kvaalen <havardk@xmms.org> - -dnl Usage: -dnl AM_PATH_ARTSC([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl -dnl Example: -dnl AM_PATH_ARTSC(0.9.5, , AC_MSG_ERROR([*** ARTSC >= 0.9.5 not installed - please install first ***])) -dnl -dnl Defines ARTSC_CFLAGS, ARTSC_LIBS and ARTSC_VERSION. -dnl - -dnl ARTSC_TEST_VERSION(AVAILABLE-VERSION, NEEDED-VERSION [, ACTION-IF-OKAY [, ACTION-IF-NOT-OKAY]]) -AC_DEFUN([ARTSC_TEST_VERSION], [ - -# Determine which version number is greater. Prints 2 to stdout if -# the second number is greater, 1 if the first number is greater, -# 0 if the numbers are equal. - -# Written 15 December 1999 by Ben Gertzfield <che@debian.org> -# Revised 15 December 1999 by Jim Monty <monty@primenet.com> - - AC_PROG_AWK - artsc_got_version=[` $AWK ' \ -BEGIN { \ - print vercmp(ARGV[1], ARGV[2]); \ -} \ - \ -function vercmp(ver1, ver2, ver1arr, ver2arr, \ - ver1len, ver2len, \ - ver1int, ver2int, len, i, p) { \ - \ - ver1len = split(ver1, ver1arr, /\./); \ - ver2len = split(ver2, ver2arr, /\./); \ - \ - len = ver1len > ver2len ? ver1len : ver2len; \ - \ - for (i = 1; i <= len; i++) { \ - p = 1000 ^ (len - i); \ - ver1int += ver1arr[i] * p; \ - ver2int += ver2arr[i] * p; \ - } \ - \ - if (ver1int < ver2int) \ - return 2; \ - else if (ver1int > ver2int) \ - return 1; \ - else \ - return 0; \ -}' $1 $2`] - - if test $artsc_got_version -eq 2; then # failure - ifelse([$4], , :, $4) - else # success! - ifelse([$3], , :, $3) - fi -]) - -AC_DEFUN([AM_PATH_ARTSC], -[ -AC_ARG_WITH(artsc-prefix,[ --with-artsc-prefix=PFX Prefix where aRts is installed (optional)], - artsc_config_prefix="$withval", artsc_config_prefix="") -AC_ARG_WITH(artsc-exec-prefix,[ --with-artsc-exec-prefix=PFX Exec prefix where aRts is installed (optional)], - artsc_config_exec_prefix="$withval", artsc_config_exec_prefix="") - -if test x$artsc_config_exec_prefix != x; then - artsc_config_args="$artsc_config_args --exec-prefix=$artsc_config_exec_prefix" - if test x${ARTSC_CONFIG+set} != xset; then - ARTSC_CONFIG=$artsc_config_exec_prefix/bin/artsc-config - fi -fi - -if test x$artsc_config_prefix != x; then - artsc_config_args="$artsc_config_args --prefix=$artsc_config_prefix" - if test x${ARTSC_CONFIG+set} != xset; then - ARTSC_CONFIG=$artsc_config_prefix/bin/artsc-config - fi -fi - -AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no) -min_artsc_version=ifelse([$1], ,0.9.5.1, $1) - -if test "$ARTSC_CONFIG" = "no"; then - no_artsc=yes -else - ARTSC_CFLAGS=`$ARTSC_CONFIG $artsc_config_args --cflags` - ARTSC_LIBS=`$ARTSC_CONFIG $artsc_config_args --libs` - ARTSC_VERSION=`$ARTSC_CONFIG $artsc_config_args --version` - - ARTSC_TEST_VERSION($ARTSC_VERSION, $min_artsc_version, ,no_artsc=version) -fi - -AC_MSG_CHECKING(for artsc - version >= $min_artsc_version) - -if test "x$no_artsc" = x; then - AC_MSG_RESULT(yes) - AC_SUBST(ARTSC_CFLAGS) - AC_SUBST(ARTSC_LIBS) - AC_SUBST(ARTSC_VERSION) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) - - if test "$ARTSC_CONFIG" = "no" ; then - echo "*** The artsc-config script installed by aRts could not be found." - echo "*** If aRts was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the ARTSC_CONFIG environment variable to the" - echo "*** full path to artsc-config." - else - if test "$no_artsc" = "version"; then - echo "*** An old version of aRts, $ARTSC_VERSION, was found." - echo "*** You need a version of aRts newer than $min_artsc_version." - echo "*** The latest version of aRts is available from" - echo "*** http://www.arts-project.org/" - echo "***" - - echo "*** If you have already installed a sufficiently new version, this error" - echo "*** probably means that the wrong copy of the artsc-config shell script is" - echo "*** being found. The easiest way to fix this is to remove the old version" - echo "*** of aRts, but you can also set the ARTSC_CONFIG environment to point to the" - echo "*** correct copy of artsc-config. (In this case, you will have to" - echo "*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf" - echo "*** so that the correct libraries are found at run-time)" - fi - fi - ARTSC_CFLAGS="" - ARTSC_LIBS="" - ifelse([$3], , :, [$3]) -fi -])
--- a/m4/jack.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -# Configure paths for JACK - -dnl AM_PATH_JACK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for JACK, and define JACK_CFLAGS and JACK_LIBS -dnl -AC_DEFUN([AM_PATH_JACK], -[dnl -dnl **** Check for Jack sound server **** -dnl -JACK_LIBS= -JACK_CFLAGS= -JACK_EVERYTHINGOK=yes - -AC_CHECK_HEADERS(jack/jack.h) -if test "${ac_cv_header_jack_jack_h}" = "no" -then - AC_MSG_WARN([Could not find jack/jack.h Install jack headers to build bio2jack]) - JACK_EVERYTHINGOK=no -else - JACK_CFLAGS="-lpthread -ljack -ldl" -fi - -AC_CHECK_LIB(jack, jack_activate, JACK_LIBS="-ljack -ldl") -if test "${ac_cv_lib_jack_jack_activate}" = "no" -then - AC_MSG_WARN([Could not find jack_activate in libjack. Ensure that you have libjack installed and that it a current version.]) - JACK_EVERYTHINGOK=no -fi - -AC_SUBST(JACK_CFLAGS) -AC_SUBST(JACK_LIBS) - -dnl **** Check for libsamplerate necessary for bio2jack **** -PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, - ac_cv_samplerate=1, ac_cv_samplerate=0) - -AC_DEFINE_UNQUOTED([HAVE_SAMPLERATE],${ac_cv_samplerate}, - [Set to 1 if you have libsamplerate.]) - -dnl Make sure libsamplerate is found, we can't compile without it -if test "${ac_cv_samplerate}" = 0 -then - AC_MSG_WARN([Could not find libsamplerate, necessary for jack output plugin.]) - JACK_EVERYTHINGOK=no -fi - -AC_SUBST(SAMPLERATE_CFLAGS) -AC_SUBST(SAMPLERATE_LIBS) - -if test "x$JACK_EVERYTHINGOK" = xno; then - ifelse([$2], , :, [$2]) -else - ifelse([$1], , :, [$1]) -fi - -])
--- a/m4/libFLAC.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -# For audacious by MSameer -# Configure paths for libFLAC -# "Inspired" by ogg.m4 - -dnl AM_PATH_LIBFLAC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl Test for libFLAC, and define LIBFLAC_CFLAGS and LIBFLAC_LIBS -dnl -AC_DEFUN([AM_PATH_LIBFLAC], -[dnl -dnl Get the cflags and libraries -dnl -AC_ARG_WITH(libFLAC,[ --with-libFLAC=PFX Prefix where libFLAC is installed (optional)], libFLAC_prefix="$withval", libFLAC_prefix="") -AC_ARG_WITH(libFLAC-libraries,[ --with-libFLAC-libraries=DIR Directory where libFLAC library is installed (optional)], libFLAC_libraries="$withval", libFLAC_libraries="") -AC_ARG_WITH(libFLAC-includes,[ --with-libFLAC-includes=DIR Directory where libFLAC header files are installed (optional)], libFLAC_includes="$withval", libFLAC_includes="") -AC_ARG_ENABLE(libFLACtest, [ --disable-libFLACtest do not try to compile and run a test libFLAC program],, enable_libFLACtest=yes) - - if test "x$libFLAC_libraries" != "x" ; then - LIBFLAC_LIBS="-L$libFLAC_libraries" - elif test "x$libFLAC_prefix" != "x" ; then - LIBFLAC_LIBS="-L$libFLAC_prefix/lib" - elif test "x$prefix" != "xNONE" ; then - LIBFLAC_LIBS="-L$libdir" - fi - - LIBFLAC_LIBS="$LIBFLAC_LIBS -lFLAC -lm" - - if test "x$libFLAC_includes" != "x" ; then - LIBFLAC_CFLAGS="-I$libFLAC_includes" - elif test "x$libFLAC_prefix" != "x" ; then - LIBFLAC_CFLAGS="-I$libFLAC_prefix/include" - elif test "$prefix" != "xNONE"; then - LIBFLAC_CFLAGS="-I$prefix/include" - fi - - AC_MSG_CHECKING(for libFLAC >= 1.1.2) - no_libFLAC="" - - - if test "x$enable_libFLACtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_CXXFLAGS="$CXXFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $LIBFLAC_CFLAGS" - CXXFLAGS="$CXXFLAGS $LIBFLAC_CFLAGS" - LIBS="$LIBS $LIBFLAC_LIBS" -dnl -dnl Now check if the installed libFLAC is sufficiently new. -dnl - rm -f conf.libFLACtest - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <FLAC/all.h> - -int main () -{ -FLAC__format_vorbiscomment_entry_name_is_legal("foo"); - system("touch conf.libFLACtest"); - return 0; -} - -],, no_libFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - - if test "x$no_libFLAC" = "x" ; then - AC_MSG_RESULT(yes) - ifelse([$1], , :, [$1]) - else - AC_MSG_RESULT(no) - if test -f conf.libFLACtest ; then - : - else - echo "*** Could not run libFLAC test program, checking why..." - CFLAGS="$CFLAGS $LIBFLAC_CFLAGS" - LIBS="$LIBS $LIBFLAC_LIBS" - AC_TRY_LINK([ -#include <stdio.h> -#include <FLAC/format.h> -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding libFLAC or finding the wrong" - echo "*** version of libFLAC. If it is not finding libFLAC, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means libFLAC was incorrectly installed" - echo "*** or that you have moved libFLAC since it was installed. In the latter case, you" - echo "*** may want to edit the libFLAC-config script: $LIBFLAC_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - LIBFLAC_CFLAGS="" - LIBFLAC_LIBS="" - ifelse([$2], , :, [$2]) - fi - AC_SUBST(LIBFLAC_CFLAGS) - AC_SUBST(LIBFLAC_LIBS) - rm -f conf.libFLACtest -])
--- a/m4/libmikmod.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -# Configure paths for libmikmod -# -# Derived from libmikmod.m4 (Owen Taylor 97-11-3) -# - -dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) -dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and -dnl LIBMIKMOD_LDADD -dnl -AC_DEFUN([AM_PATH_LIBMIKMOD], -[dnl -dnl Get the cflags and libraries from the libmikmod-config script -dnl -AC_ARG_WITH(libmikmod-prefix,[ --with-libmikmod-prefix=PFX Prefix where libmikmod is installed (optional)], - libmikmod_config_prefix="$withval", libmikmod_config_prefix="") -AC_ARG_WITH(libmikmod-exec-prefix,[ --with-libmikmod-exec-prefix=PFX Exec prefix where libmikmod is installed (optional)], - libmikmod_config_exec_prefix="$withval", libmikmod_config_exec_prefix="") - - if test x$libmikmod_config_exec_prefix != x ; then - libmikmod_config_args="$libmikmod_config_args --exec-prefix=$libmikmod_config_exec_prefix" - if test x${LIBMIKMOD_CONFIG+set} != xset ; then - LIBMIKMOD_CONFIG=$libmikmod_config_exec_prefix/bin/libmikmod-config - fi - fi - if test x$libmikmod_config_prefix != x ; then - libmikmod_config_args="$libmikmod_config_args --prefix=$libmikmod_config_prefix" - if test x${LIBMIKMOD_CONFIG+set} != xset ; then - LIBMIKMOD_CONFIG=$libmikmod_config_prefix/bin/libmikmod-config - fi - fi - - AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no) - min_libmikmod_version=ifelse([$1], ,3.1.5,$1) - AC_MSG_CHECKING(for libmikmod - version >= $min_libmikmod_version) - no_libmikmod="" - if test "$LIBMIKMOD_CONFIG" = "no" ; then - no_libmikmod=yes - else - LIBMIKMOD_CFLAGS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --cflags` - LIBMIKMOD_LIBS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --libs` - LIBMIKMOD_LDADD=`$LIBMIKMOD_CONFIG $libmikmod_config_args --ldadd` - libmikmod_config_major_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` - libmikmod_config_minor_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` - libmikmod_config_micro_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` - fi - if test "x$no_libmikmod" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$LIBMIKMOD_CONFIG" = "no" ; then - echo "*** The libmikmod-config script installed by libmikmod could not be found" - echo "*** If libmikmod was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the LIBMIKMOD_CONFIG environment variable to the" - echo "*** full path to libmikmod-config." - fi - LIBMIKMOD_CFLAGS="" - LIBMIKMOD_LIBS="" - LIBMIKMOD_LDADD="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(LIBMIKMOD_CFLAGS) - AC_SUBST(LIBMIKMOD_LIBS) - AC_SUBST(LIBMIKMOD_LDADD) - rm -f conf.mikmodtest -]) - -AC_DEFUN([AC_FIND_FILE], - [ - $3=NO - for i in $2; - do - for j in $1; - do - if test -r "$i/$j"; then - $3=$i - break 2 - fi - done - done - ] -) -
--- a/m4/lirc.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,363 +0,0 @@ -## lirc.m4 (Macros for autoconf) -## -## (C) 1999 Christoph Bartelmus (lirc@bartelmus.de) -## - -####################################################################### -## -## Check for LIRC -## -####################################################################### - -dnl AC_PATH_LIRC([MINIMUM-VERSION]) -dnl Check for LIRC and define LIRCD -dnl -AC_DEFUN([AC_PATH_LIRC], -[ - min_lirc_version=ifelse([$1], ,0.5.5,$1) - AC_MSG_CHECKING(for LIRC>=$min_lirc_version) - - AC_CACHE_VAL(ac_cv_have_lirc,[ - no_lirc=no - lirc_version=none - lirc_cross_compiling=no - - if test ! -S /dev/lircd; then - LIRCD=/dev/null - no_lirc=yes - else - LIRCD=/dev/lircd - - rm -f conf.lirc - ac_save_cflags="${CFLAGS}" - CFLAGS="$CFLAGS -DLIRCD=\"$LIRCD\"" - AC_TRY_RUN( -[ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> -#include <getopt.h> -#include <sys/socket.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/un.h> -#include <errno.h> -#include <signal.h> -#include <limits.h> - -#define PACKET_SIZE 256 -/* three seconds */ -#define TIMEOUT 3 - -int timeout=0; - -void sigalrm(int sig) -{ - timeout=1; -} - -const char *read_string(int fd) -{ - static char buffer[PACKET_SIZE+1]=""; - char *end; - static int ptr=0; - ssize_t ret; - - if(ptr>0) - { - memmove(buffer,buffer+ptr,strlen(buffer+ptr)+1); - ptr=strlen(buffer); - end=strchr(buffer,'\n'); - } - else - { - end=NULL; - } - alarm(TIMEOUT); - while(end==NULL) - { - if(PACKET_SIZE<=ptr) - { - ptr=0; - return(NULL); - } - ret=read(fd,buffer+ptr,PACKET_SIZE-ptr); - - if(ret<=0 || timeout) - { - if(!timeout) - { - alarm(0); - } - ptr=0; - return(NULL); - } - buffer[ptr+ret]=0; - ptr=strlen(buffer); - end=strchr(buffer,'\n'); - } - alarm(0);timeout=0; - - end[0]=0; - ptr=strlen(buffer)+1; - return(buffer); -} - -enum packet_state -{ - P_BEGIN, - P_MESSAGE, - P_STATUS, - P_DATA, - P_N, - P_DATA_N, - P_END -}; - -char *get_version(int fd,const char *packet) -{ - int done,todo; - const char *string,*data; - char *endptr; - enum packet_state state; - int status,n; - unsigned long data_n; - unsigned int major,minor,micro; - static char version[100]; - - todo=strlen(packet); - data=packet; - while(todo>0) - { - done=write(fd,(void *) data,todo); - if(done<0) - { - return(NULL); - } - data+=done; - todo-=done; - } - - /* get response */ - status=0; - state=P_BEGIN; - n=0; - while(1) - { - string=read_string(fd); - if(string==NULL) return(NULL); - switch(state) - { - case P_BEGIN: - if(strcasecmp(string,"BEGIN")!=0) - { - continue; - } - state=P_MESSAGE; - break; - case P_MESSAGE: - if(strncasecmp(string,packet,strlen(string))!=0 || - strlen(string)+1!=strlen(packet)) - { - state=P_BEGIN; - continue; - } - state=P_STATUS; - break; - case P_STATUS: - if(strcasecmp(string,"SUCCESS")==0) - { - status=0; - } - else if(strcasecmp(string,"END")==0) - { - status=0; - return(NULL); - } - else if(strcasecmp(string,"ERROR")==0) - { - status=-1; - } - else - { - goto bad_packet; - } - state=P_DATA; - break; - case P_DATA: - if(strcasecmp(string,"END")==0) - { - return(NULL); - } - else if(strcasecmp(string,"DATA")==0) - { - state=P_N; - break; - } - goto bad_packet; - case P_N: - errno=0; - data_n=strtoul(string,&endptr,0); - if(!*string || *endptr) - { - goto bad_packet; - } - if(data_n==0) - { - state=P_END; - } - else - { - state=P_DATA_N; - } - break; - case P_DATA_N: - if(data_n==1 && status==0) - { - if(sscanf(string,"%u.%u.%u", - &major,&minor,µ)==3) - { - sprintf(version,"%u.%u.%u", - major,minor,micro); - } - else - { - goto bad_packet; - } - } - n++; - if(n==data_n) state=P_END; - break; - case P_END: - if(strcasecmp(string,"END")==0) - { - return(version); - } - goto bad_packet; - break; - } - } - bad_packet: - return(NULL); -} - -int main(int argc,char **argv) -{ - char *version,*min_version; - unsigned int major,minor,micro,min_major,min_minor,min_micro; - struct sockaddr_un addr; - FILE *result; - int fd; - struct sigaction act; - - result=fopen("conf.lirc","w"); - if(result==NULL) exit(EXIT_FAILURE); - - act.sa_handler=sigalrm; - sigemptyset(&act.sa_mask); - act.sa_flags=0; /* we need EINTR */ - sigaction(SIGALRM,&act,NULL); - - addr.sun_family=AF_UNIX; - strcpy(addr.sun_path,LIRCD); - fd=socket(AF_UNIX,SOCK_STREAM,0); - if(fd==-1) - { - fprintf(result,"unknown"); - fclose(result); - close(fd); - exit(EXIT_FAILURE); - }; - if(connect(fd,(struct sockaddr *)&addr,sizeof(addr))==-1) - { - fprintf(result,"unknown"); - fclose(result); - close(fd); - exit(EXIT_FAILURE); - }; - - version=get_version(fd,"VERSION\n"); - if(version==NULL) - { - fprintf(result,"<0.5.5"); - fclose(result); - close(fd); - exit(EXIT_FAILURE); - } - fprintf(result,"%s",version); - fclose(result); - close(fd); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - - min_version=strdup("$min_lirc_version"); - if(min_version==NULL) exit(EXIT_FAILURE); - - if(sscanf(version,"%u.%u.%u",&major,&minor,µ)!=3 || - sscanf(min_version,"%u.%u.%u",&min_major,&min_minor,&min_micro)!=3) - { - exit(EXIT_FAILURE); - } - if(major<min_major || - (major==min_major && minor<min_minor) || - (major==min_major && minor==min_minor && micro<min_micro)) - { - exit(EXIT_FAILURE); - } - - exit(EXIT_SUCCESS); -} -], - if test -f conf.lirc; then - lirc_version=`cat conf.lirc` - -## lirc_major_version=`cat lirc.conf | \ -## sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` -## lirc_minor_version=`cat lirc.conf | \ -## sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` -## lirc_micro_version=`cat lirc.conf | \ -## sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - else - no_lirc=yes - fi, - no_lirc=yes - if test -f conf.lirc; then - lirc_version=`cat conf.lirc` - else - lirc_version=none - fi - ,lirc_cross_compiling=yes - ) -## AC_TRY_RUN() - rm -f conf.lirc - CFLAGS="$ac_save_CFLAGS" - fi - ac_cv_have_lirc="no_lirc=${no_lirc} lirc_version=\"${lirc_version}\" \ - lirc_cross_compiling=${lirc_cross_compiling} \ - LIRCD=${LIRCD}" - ]) -## AC_CACHE_VAL - - eval "$ac_cv_have_lirc" - - if test x${no_lirc} = xyes; then - if test x${lirc_version} = xunknown; then - AC_MSG_RESULT([missing (lircd not running ?)]) - elif test x${lirc_version} != xnone; then - AC_MSG_RESULT([missing (found lirc-${lirc_version})]) - else - AC_MSG_RESULT(missing) - fi - else - if test x${lirc_cross_compiling} = xyes; then - AC_MSG_RESULT(found) - else - AC_MSG_RESULT([found lirc-${lirc_version}]) - fi - fi - - AC_DEFINE_UNQUOTED(LIRCD,"${LIRCD}") -] -)
--- a/m4/sdl.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -# Configure paths for SDL -# Sam Lantinga 9/21/99 -# stolen from Manish Singh -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS -dnl -AC_DEFUN([AM_PATH_SDL], -[dnl -dnl Get the cflags and libraries from the sdl-config script -dnl -AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], - sdl_prefix="$withval", sdl_prefix="") -AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], - sdl_exec_prefix="$withval", sdl_exec_prefix="") - - if test x$sdl_exec_prefix != x ; then - sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config - fi - fi - if test x$sdl_prefix != x ; then - sdl_args="$sdl_args --prefix=$sdl_prefix" - if test x${SDL_CONFIG+set} != xset ; then - SDL_CONFIG=$sdl_prefix/bin/sdl-config - fi - fi - - AC_REQUIRE([AC_CANONICAL_TARGET]) - PATH="$prefix/bin:$prefix/usr/bin:$PATH" - AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) - min_sdl_version=ifelse([$1], ,0.11.0,$1) - AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) - no_sdl="" - if test "$SDL_CONFIG" = "no" ; then - no_sdl=yes - else - SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` - SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` - - sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - fi - if test "x$no_sdl" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$SDL_CONFIG" = "no" ; then - echo "*** The sdl-config script installed by SDL could not be found" - echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the SDL_CONFIG environment variable to the" - echo "*** full path to sdl-config." - fi - SDL_CFLAGS="" - SDL_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(SDL_CFLAGS) - AC_SUBST(SDL_LIBS) - rm -f conf.sdltest -])
--- a/m4/sidplay.m4 Tue Mar 06 18:54:10 2007 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,552 +0,0 @@ -# Configure paths for SID support - -dnl ------------------------------------------------------------------------- -dnl Try to find a file (or one of more files in a list of dirs). -dnl ------------------------------------------------------------------------- - -AC_DEFUN([SIDPLAY_FIND_FILE], -[ -$3="" -for i in $2; do -for j in $1; do -if test -r "$i/$j"; then - $3=$i - break 2 - fi -done -done -]) - -AC_DEFUN([SIDPLAY_TRY_LINK_SAVE], -[ - xs_cxx_save="$CXX" - xs_cxxflags_save="$CXXFLAGS" - xs_ldflags_save="$LDFLAGS" - xs_libs_save="$LIBS" -]) - - -AC_DEFUN([SIDPLAY_TRY_LINK_RESTORE], -[ - CXX="$xs_cxx_save" - CXXFLAGS="$xs_cxxflags_save" - LDFLAGS="$xs_ldflags_save" - LIBS="$xs_libs_save" -]) - - -dnl ------------------------------------------------------------------------- -dnl Try to find SIDPLAY library and header files. -dnl $xs_have_sidplay1 will be "yes" or "no" -dnl @SIDPLAY1_LDADD@ will be substituted with linker parameters -dnl @SIDPLAY1_INCLUDES@ will be substituted with compiler parameters -dnl ------------------------------------------------------------------------- - -AC_DEFUN([XS_PATH_LIBSIDPLAY1], -[ - AC_MSG_CHECKING([for working SIDPlay1 library and headers]) - - AC_LANG_PUSH([C++]) - - # Use include path given by user (if any). - if test -n "$xs_sidplay1_includes"; then - xs_sidplay1_cxxflags="-I$xs_sidplay1_includes" - else - xs_sidplay1_cxxflags="" - fi - - # Use library path given by user (if any). - if test -n "$xs_sidplay1_library"; then - xs_sidplay1_ldflags="-L$xs_sidplay1_library" - else - xs_sidplay1_ldflags="" - fi - - AC_CACHE_VAL(xs_cv_have_sidplay1, - [ - # Run test compilation with either standard search path - # or user-defined paths. - SIDPLAY_TRY_LIBSIDPLAY1 - if test "$xs_sidplay1_works" = yes; then - xs_cv_have_sidplay1="xs_have_sidplay1=yes \ - xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" \ - xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" " - else - SIDPLAY_FIND_LIBSIDPLAY1 - fi - ]) - - eval "$xs_cv_have_sidplay1" - - if test "$xs_have_sidplay1" = yes; then - if test -n "$xs_sidplay1_cxxflags" || test -n "$xs_sidplay1_ldflags"; then - AC_MSG_RESULT([$xs_sidplay1_cxxflags $xs_sidplay1_ldflags]) - else - AC_MSG_RESULT([yes]) - fi - - SIDPLAY1_LDADD="$xs_sidplay1_ldflags -lsidplay" - SIDPLAY1_INCLUDES="$xs_sidplay1_cxxflags" - AC_SUBST([SIDPLAY1_LDADD]) - AC_SUBST([SIDPLAY1_INCLUDES]) - else - AC_MSG_RESULT([no]) - fi - - AC_LANG_POP([C++]) -]) - -dnl Functions used by XS_PATH_LIBSIDPLAY1. - -AC_DEFUN([SIDPLAY_FIND_LIBSIDPLAY1], -[ - # Search common locations where header files might be stored. - xs_sidplay1_incdirs="$xs_sidplay1_includes /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include /opt/sfw/include /opt/csw/include" - SIDPLAY_FIND_FILE(sidplay/sidtune.h, $xs_sidplay1_incdirs, xs_sidplay1_includes) - - # Search common locations where library might be stored. - xs_sidplay1_libdirs="$xs_sidplay1_library /usr/lib /usr/lib/sidplay /usr/local/lib/sidplay /opt/sfw/lib /opt/csw/lib" - SIDPLAY_FIND_FILE(libsidplay.a libsidplay.so libsidplay.so.1 libsidplay.so.1.36 libsidplay.so.1.37, - $xs_sidplay1_libdirs, xs_sidplay1_library) - - if test -z "$xs_sidplay1_includes" || test -z "$xs_sidplay1_library"; then - xs_cv_have_sidplay1="xs_have_sidplay1=no \ - xs_sidplay1_ldflags=\"\" xs_sidplay1_cxxflags=\"\" " - else - # Test compilation with found paths. - xs_sidplay1_ldflags="-L$xs_sidplay1_library" - xs_sidplay1_cxxflags="-I$xs_sidplay1_includes" - SIDPLAY_TRY_LIBSIDPLAY1 - xs_cv_have_sidplay1="xs_have_sidplay1=$xs_sidplay1_works \ - xs_sidplay1_ldflags=\"$xs_sidplay1_ldflags\" \ - xs_sidplay1_cxxflags=\"$xs_sidplay1_cxxflags\" " - fi -]) - -AC_DEFUN([SIDPLAY_TRY_LIBSIDPLAY1], -[ - SIDPLAY_TRY_LINK_SAVE - - CXXFLAGS="$CXXFLAGS $xs_sidplay1_cxxflags" - LDFLAGS="$LDFLAGS $xs_sidplay1_ldflags" - LIBS="$LIBS -lsidplay" - - AC_LINK_IFELSE([AC_LANG_PROGRAM( - [[#include <sidplay/sidtune.h>]], - [[sidTune* myTest = new sidTune(0);]])], - [xs_sidplay1_works=yes], - [xs_sidplay1_works=no] - ) - - SIDPLAY_TRY_LINK_RESTORE -]) - - - - - -dnl ------------------------------------------------------------------------- -dnl Try to find SIDPLAY2 library and header files. -dnl $xs_have_sidplay2 will be "yes" or "no" -dnl @SIDPLAY_LDADD@ will be substituted with linker parameters -dnl @SIDPLAY_INCLUDES@ will be substituted with compiler parameters -dnl ------------------------------------------------------------------------- -AC_DEFUN([XS_PATH_LIBSIDPLAY2], -[ - AC_MSG_CHECKING([for working SIDPlay2 library and headers]) - - AC_LANG_PUSH([C++]) - - AC_PATH_PROG([PKG_CONFIG], [pkg-config]) - if test -n "$PKG_CONFIG" && $PKG_CONFIG --atleast-version $LIBSIDPLAY2_REQUIRED_VERSION libsidplay2; then - xs_pkgcfg_knows=yes - else - xs_pkgcfg_knows=no - fi - - # Derive sidbuilders path from libsidplay2 root. - if test -n "$xs_sidplay2_library"; then - xs_sidplay2_builders="$xs_sidplay2_library/sidplay/builders" - elif test "$xs_pkgcfg_knows" = yes ; then - xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2` - fi - - AC_CACHE_VAL(xs_cv_have_sidplay2, - [ - # Run test compilation with either standard search path - # or user-defined paths. - xs_sidplay2_ldadd="-lsidplay2" - SIDPLAY_TRY_LIBSIDPLAY2 - if test "$xs_sidplay2_works" = yes; then - xs_cv_have_sidplay2="xs_have_sidplay2=yes \ - xs_sidplay2_cxxflags=\"$xs_sidplay2_cxxflags\" \ - xs_sidplay2_ldadd=\"$xs_sidplay2_ldadd\" \ - xs_sidplay2_builders=\"$xs_sidplay2_builders\" " - else - SIDPLAY_FIND_LIBSIDPLAY2 - fi - ]) - eval "$xs_cv_have_sidplay2" - if test "$xs_have_sidplay2" = yes; then - if test -n "$xs_sidplay2_cxxflags" || test -n "$xs_sidplay2_ldadd"; then - AC_MSG_RESULT([$xs_sidplay2_cxxflags $xs_sidplay2_ldadd]) - else - AC_MSG_RESULT([yes]) - fi - - SIDPLAY2_LDADD="$xs_sidplay2_ldadd" - SIDPLAY2_INCLUDES="$xs_sidplay2_cxxflags" - AC_SUBST([SIDPLAY2_LDADD]) - AC_SUBST([SIDPLAY2_INCLUDES]) - else - AC_MSG_RESULT([no]) - fi - - AC_LANG_POP([C++]) -]) - - -dnl Functions used by XS_PATH_LIBSIDPLAY2. -AC_DEFUN([SIDPLAY_FIND_LIBSIDPLAY2], -[ - # See whether user didn't provide paths. - if test -z "$xs_sidplay2_includes"; then - if test "$xs_pkgcfg_knows" = yes ; then - xs_sidplay2_includes=`$PKG_CONFIG --variable=includedir libsidplay2` - xs_sidplay2_cxxflags=`$PKG_CONFIG --cflags libsidplay2` - else - # Search common locations where header files might be stored. - xs_sidplay2_incdirs="$xs_sidplay2_includes $xs_sidplay2_includes/include /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include /opt/sfw/include /opt/csw/include" - SIDPLAY_FIND_FILE(sidplay/sidplay2.h,$xs_sidplay2_incdirs,xs_sidplay2_includes) - xs_sidplay2_cxxflags="-I$xs_sidplay2_includes" - fi - else - xs_sidplay2_cxxflags="-I$xs_sidplay2_includes" - fi - if test -z "$xs_sidplay2_library"; then - if test "$xs_pkgcfg_knows" = yes ; then - xs_sidplay2_library=`$PKG_CONFIG --variable=libdir libsidplay2` - xs_sidplay2_ldadd=`$PKG_CONFIG --libs libsidplay2` - xs_sidplay2_builders=`$PKG_CONFIG --variable=builders libsidplay2` - else - # Search common locations where library might be stored. - xs_sidplay2_libdirs="$xs_sidplay2_library $xs_sidplay2_library/lib $xs_sidplay2_library/src /usr/lib /usr/lib/sidplay /usr/local/lib/sidplay /opt/sfw/lib /opt/csw/lib" - SIDPLAY_FIND_FILE(libsidplay2.la,$xs_sidplay2_libdirs,xs_sidplay2_library) - xs_sidplay2_ldadd="-L$xs_sidplay2_library -lsidplay2" - xs_sidplay2_builders="$xs_sidplay2_library/sidplay/builders" - fi - else - xs_sidplay2_ldadd="-L$xs_sidplay2_library -lsidplay2" - fi - if test -z "$xs_sidplay2_includes" || test -z "$xs_sidplay2_library"; then - xs_cv_have_sidplay2="xs_have_sidplay2=no \ - xs_sidplay2_ldadd=\"\" xs_sidplay2_cxxflags=\"\" \ - xs_sidplay2_builders=\"\" " - else - # Test compilation with found paths. - xs_sidplay2_ldadd="-L$xs_sidplay2_library -lsidplay2" - xs_sidplay2_cxxflags="-I$xs_sidplay2_includes" - SIDPLAY_TRY_LIBSIDPLAY2 - xs_cv_have_sidplay2="xs_have_sidplay2=$xs_sidplay2_works \ - xs_sidplay2_ldadd=\"$xs_sidplay2_ldadd\" \ - xs_sidplay2_cxxflags=\"$xs_sidplay2_cxxflags\" \ - xs_sidplay2_builders=\"$xs_sidplay2_builders\" " - fi -]) - - -AC_DEFUN([SIDPLAY_TRY_LIBSIDPLAY2], -[ - SIDPLAY_TRY_LINK_SAVE - - CXXFLAGS="$CXXFLAGS $xs_sidplay2_cxxflags -DHAVE_UNIX" - LDFLAGS="$LDFLAGS $xs_sidplay2_ldadd" - - AC_LINK_IFELSE([AC_LANG_PROGRAM( - [[#include <sidplay/sidplay2.h>]], - [[sidplay2 *myEngine;]])], - [xs_sidplay2_works=yes], - [xs_sidplay2_works=no] - ) - - SIDPLAY_TRY_LINK_RESTORE -]) - - -dnl ------------------------------------------------------------------------- -dnl Find libsidplay2 builders (sidbuilders) dir. -dnl @BUILDERS_INCLUDES@ -dnl @BUILDERS_LDFLAGS@ -dnl ------------------------------------------------------------------------- -AC_DEFUN([BUILDERS_FIND], -[ - AC_MSG_CHECKING([for SIDPlay2 builders directory]) - - AC_LANG_PUSH([C++]) - - AC_REQUIRE([XS_PATH_LIBSIDPLAY2]) - - dnl Be pessimistic. - builders_available=no - - dnl Sidbuilder headers are included with "builders" prefix. - builders_includedir=$xs_sidplay2_includes - builders_libdir=$xs_sidplay2_builders - - dnl If libsidplay2 is in standard library search path, we need - dnl to get an argument whether /usr, /usr/local, etc. Else we - dnl can only use ${libdir}/sidplay/builders, but then are - dnl unable to check whether files exist as long as ${exec_prefix} - dnl is not defined in the configure script. So, this is a bit - dnl ugly, but a satisfactory fallback default for those who - dnl define ${prefix} and ${exec_prefix}. - if test -z $builders_libdir; then - eval "builders_libdir=$libdir/sidplay/builders" - fi - - AC_ARG_WITH(sidbuilders, - [ --with-sidbuilders=DIR what the SIDPlay2 builders install PREFIX is], - [builders_includedir="$withval/include" - builders_libdir="$withval/lib/sidplay/builders"]) - - AC_ARG_WITH(builders-inc, - [ --with-builders-inc=DIR where the SIDPlay2 builders headers are located], - [builders_includedir="$withval"]) - - AC_ARG_WITH(builders-lib, - [ --with-builders-lib=DIR where the SIDPlay2 builders libraries are installed], - [builders_libdir="$withval"]) - - if test -n "$builders_includedir"; then - BUILDERS_INCLUDES="-I$builders_includedir" - fi - - if test -n "$builders_libdir"; then - BUILDERS_LDFLAGS="-L$builders_libdir" - fi - - if test -d $builders_libdir; then - xs_have_sidbuilders_dir=yes - AC_MSG_RESULT([$builders_libdir]) - else - xs_have_sidbuilders_dir=no - AC_MSG_RESULT([$xs_have_sidbuilders_dir]) - AC_MSG_ERROR([$builders_libdir not found! -Check --help on how to specify SIDPlay2 and/or builders library and -header path, or set --exec-prefix to the same prefix as your installation -of libsidplay2. - ]) - fi - - AC_SUBST([BUILDERS_INCLUDES]) - AC_SUBST([BUILDERS_LDFLAGS]) - - AC_LANG_POP([C++]) -]) - - -dnl ------------------------------------------------------------------------- -dnl Test for working reSID builder. -dnl sets $(RESID_LDADD), substitutes @RESID_LDADD@ -dnl ------------------------------------------------------------------------- -AC_DEFUN([BUILDERS_FIND_RESID], -[ - AC_MSG_CHECKING([for reSID builder module]) - AC_LANG_PUSH([C++]) - SIDPLAY_TRY_LINK_SAVE - - CXXFLAGS="$CXXFLAGS $BUILDERS_INCLUDES" - LDFLAGS="$LDFLAGS $BUILDERS_LDFLAGS" - LIBS="$LIBS -lresid-builder" - - AC_LINK_IFELSE([AC_LANG_PROGRAM( - [[#include <sidplay/builders/resid.h>]], - [[ReSIDBuilder *sid;]])], - [builders_work=yes], - [builders_work=no] - ) - - SIDPLAY_TRY_LINK_RESTORE - - if test "$builders_work" = yes; then - builders_available=yes - xs_builders="reSID $xs_builders" - AC_DEFINE([HAVE_RESID_BUILDER], [], [resid builder]) - RESID_LDADD="-lresid-builder" - fi - AC_MSG_RESULT($builders_work) - AC_SUBST([RESID_LDADD]) - AC_LANG_POP([C++]) -]) - - -dnl ------------------------------------------------------------------------- -dnl Test for working HardSID builder. -dnl sets $(HARDSID_LDADD), substitutes @HARDSID_LDADD@ -dnl ------------------------------------------------------------------------- -AC_DEFUN([BUILDERS_FIND_HARDSID], -[ - AC_MSG_CHECKING([for HardSID builder module]) - AC_LANG_PUSH([C++]) - SIDPLAY_TRY_LINK_SAVE - - CXXFLAGS="$CXXFLAGS $BUILDERS_INCLUDES" - LDFLAGS="$LDFLAGS $BUILDERS_LDFLAGS" - LIBS="$LIBS -lhardsid-builder" - - AC_LINK_IFELSE([AC_LANG_PROGRAM( - [[#include <sidplay/builders/hardsid.h>]], - [[HardSID *sid;]])], - [builders_work=yes], - [builders_work=no] - ) - - SIDPLAY_TRY_LINK_RESTORE - - if test "$builders_work" = yes; then - builders_available=yes - xs_builders="HardSID $xs_builders" - AC_DEFINE([HAVE_HARDSID_BUILDER], [], [harsid builder]) - HARDSID_LDADD="-lhardsid-builder" - fi - AC_MSG_RESULT($builders_work) - AC_SUBST([HARDSID_LDADD]) - AC_LANG_POP([C++]) -]) - - -dnl AM_PATH_SIDPLAY([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl Test for SID libraries, and define SIDPLAY_CFLAGS and SIDPLAY_LIBS -dnl -AC_DEFUN([AM_PATH_SIDPLAY], -[ -dnl -dnl Get the cflags and libraries -dnl - -dnl *** -dnl *** libSIDPlay 1 options -dnl *** -AC_ARG_WITH(sidplay1, -[ --with-sidplay1=PREFIX Enable SIDPlay1 with install-PREFIX], -[ -if test "x$withval" = xyes; then -xs_sidplay1=yes -xs_sidplay1_library="" -xs_sidplay1_includes="" -else -if test "x$withval" = xno; then - xs_sidplay1=no - else - xs_sidplay1=yes - xs_sidplay1_includes="$withval/include" - xs_sidplay1_library="$withval/lib" - fi -fi -],[ -xs_sidplay1=try -xs_sidplay1_library="" -xs_sidplay1_includes="" -]) - -AC_ARG_WITH(sidplay1-inc, -[ --with-sidplay1-inc=DIR Where the SIDPlay1 headers are located], -[xs_sidplay1_includes="$withval"],) - -AC_ARG_WITH(sidplay1-lib, -[ --with-sidplay1-lib=DIR Where the SIDPlay1 library is installed], -[xs_sidplay1_library="$withval"],) - -dnl *** -dnl *** libSIDPlay 2 options -dnl *** -AC_ARG_WITH(sidplay2, -[ --with-sidplay2=PREFIX Enable SIDPlay2 with install-PREFIX], -[ -if test "x$withval" = xyes; then -xs_sidplay2=yes -xs_sidplay2_library="" -xs_sidplay2_includes="" -else -if test "x$withval" = xno; then - xs_sidplay2=no - else - xs_sidplay2=yes - xs_sidplay2_includes="$withval/include" - xs_sidplay2_library="$withval/lib" - fi -fi -],[ -xs_sidplay2=try -xs_sidplay2_library="" -xs_sidplay2_includes="" -]) - -AC_ARG_WITH(sidplay2-inc, -[ --with-sidplay2-inc=DIR Where the SIDPlay2 headers are located], -[xs_sidplay2_includes="$withval"],) - - -AC_ARG_WITH(sidplay2-lib, -[ --with-sidplay2-lib=DIR Where the SIDPlay2 library is installed], -[xs_sidplay2_library="$withval"],) - -dnl *** -dnl *** Determine if libraries are wanted and available -dnl *** -OPT_SIDPLAY1="no" -if test "x$xs_sidplay1" = xtry; then - XS_PATH_LIBSIDPLAY1 - else - if test "x$xs_sidplay1" = xyes; then - XS_PATH_LIBSIDPLAY1 - if test "x$xs_have_sidplay1" = xno; then - AC_MSG_WARN([libSIDPlay1 library and/or headers were not found!]) - fi - fi -fi -if test "x$xs_have_sidplay1" = xyes; then - AC_DEFINE([HAVE_SIDPLAY1],[],[sidplay1 available]) - OPT_SIDPLAY1="yes" -fi - -OPT_SIDPLAY2="no" -LIBSIDPLAY2_REQUIRED_VERSION="2.1.0" -if test "x$xs_sidplay2" = xtry; then - XS_PATH_LIBSIDPLAY2 - else - if test "x$xs_sidplay2" = xyes; then - XS_PATH_LIBSIDPLAY2 - if test "x$xs_have_sidplay2" = xno; then - AC_MSG_WARN([libSIDPlay2 library and/or headers were not found!]) - fi - fi -fi -if test "x$xs_have_sidplay2" = xyes; then - AC_DEFINE([HAVE_SIDPLAY2],[],[sidplay2 available]) - OPT_SIDPLAY2="yes" - BUILDERS_FIND - BUILDERS_FIND_RESID - BUILDERS_FIND_HARDSID - if test "x$builders_available" = xno; then - AC_MSG_WARN([No builder modules were found in the sidbuilders directory!]); - fi -fi - - -dnl *** -dnl *** Check if we have some emulator library available? -dnl *** -if test "x$OPT_SIDPLAY1" = xno; then -if test "x$OPT_SIDPLAY2" = xno; then -SIDPLAY_HAVESOMETHING="no" -fi -fi - -if test "x$SIDPLAY_HAVESOMETHING" = xno; then - ifelse([$2], , :, [$2]) -else - ifelse([$1], , :, [$1]) -fi - -])