Mercurial > hg > xmms-sid
comparison acsidplay.m4 @ 7:e5c49367b899
Updated to 0.8
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 03 Jun 2003 11:25:05 +0000 |
parents | 183e7cbc1036 |
children |
comparison
equal
deleted
inserted
replaced
6:ff6b3a556a15 | 7:e5c49367b899 |
---|---|
1 # sidplay.m4 sidplay checks | 1 # sidplay.m4 - libSIDPlay 1.xx.xx checks |
2 # Originally by Michael Schwendt | |
3 # Modified by Matti 'ccr' Hamalainen | |
4 | |
5 dnl ------------------------------------------------------------------------- | |
6 dnl Try to find a file (or one of more files in a list of dirs). | |
7 dnl ------------------------------------------------------------------------- | |
2 | 8 |
3 AC_DEFUN(AC_FIND_FILE, | 9 AC_DEFUN(AC_FIND_FILE, |
4 [ | 10 [ |
5 $3=NO | 11 $3=NO |
6 for i in $2; | 12 for i in $2; |
14 done | 20 done |
15 done | 21 done |
16 ] | 22 ] |
17 ) | 23 ) |
18 | 24 |
25 | |
26 dnl ------------------------------------------------------------------------- | |
27 dnl Try to find SIDPLAY includes and library. | |
28 dnl ------------------------------------------------------------------------- | |
19 AC_DEFUN(AC_PATH_LIBSIDPLAY, | 29 AC_DEFUN(AC_PATH_LIBSIDPLAY, |
20 [ | 30 [ |
21 AC_MSG_CHECKING([for SIDPLAY includes and library]) | 31 AC_MSG_CHECKING([for SIDPLAY includes and library]) |
22 AC_LANG_SAVE | 32 AC_LANG_SAVE |
23 AC_LANG_CPLUSPLUS | 33 AC_LANG_CPLUSPLUS |
44 where the sidplay library is installed], | 54 where the sidplay library is installed], |
45 [ac_sidplay_library="$withval" | 55 [ac_sidplay_library="$withval" |
46 ]) | 56 ]) |
47 | 57 |
48 if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then | 58 if test "$ac_sidplay_cflags" = NO || test "$ac_sidplay_library" = NO; then |
49 #search common locations | 59 |
60 # Search common locations | |
50 | 61 |
51 AC_CACHE_VAL(ac_cv_have_sidplay, | 62 AC_CACHE_VAL(ac_cv_have_sidplay, |
52 [ | 63 [ |
53 sidplay_incdirs="$ac_sidplay_cflags /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include" | 64 sidplay_incdirs="$ac_sidplay_cflags /usr/include /usr/local/include /usr/lib/sidplay/include /usr/local/lib/sidplay/include" |
54 AC_FIND_FILE(sidplay/sidtune.h,$sidplay_incdirs,sidplay_foundincdir) | 65 AC_FIND_FILE(sidplay/sidtune.h,$sidplay_incdirs,sidplay_foundincdir) |
97 all_libraries="$SIDPLAY_LIBS $all_libraries" | 108 all_libraries="$SIDPLAY_LIBS $all_libraries" |
98 SIDPLAY_CFLAGS="-I$sidplay_cflags" | 109 SIDPLAY_CFLAGS="-I$sidplay_cflags" |
99 all_includes="$SIDPLAY_CFLAGS $all_includes" | 110 all_includes="$SIDPLAY_CFLAGS $all_includes" |
100 fi | 111 fi |
101 | 112 |
102 dnl Test compilation. | |
103 | 113 |
114 dnl *** | |
115 dnl *** Test compilation | |
116 dnl *** | |
104 AC_MSG_CHECKING([whether -lsidplay works]) | 117 AC_MSG_CHECKING([whether -lsidplay works]) |
105 ac_cxxflags_safe=$CXXFLAGS | 118 ac_cxxflags_safe=$CXXFLAGS |
106 ac_ldflags_safe=$LDFLAGS | 119 ac_ldflags_safe=$LDFLAGS |
107 ac_libs_safe=$LIBS | 120 ac_libs_safe=$LIBS |
108 | 121 |
127 AC_MSG_RESULT([$ac_cv_sidplay_works]) | 140 AC_MSG_RESULT([$ac_cv_sidplay_works]) |
128 if test "$ac_cv_sidplay_works" != yes; then | 141 if test "$ac_cv_sidplay_works" != yes; then |
129 have_sidplay=no | 142 have_sidplay=no |
130 fi | 143 fi |
131 | 144 |
132 dnl | 145 |
146 dnl *** | |
147 dnl *** Substitute variables | |
148 dnl *** | |
133 | 149 |
134 AC_SUBST(SIDPLAY_CFLAGS) | 150 AC_SUBST(SIDPLAY_CFLAGS) |
135 AC_SUBST(SIDPLAY_LIBS) | 151 AC_SUBST(SIDPLAY_LIBS) |
136 | 152 |
137 AC_SUBST(sidplay_library) | 153 AC_SUBST(sidplay_library) |