Check for ALSA
Better checking if libpng needs zlib to link. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@805
This commit is contained in:
parent
9a6d254943
commit
96bcd602af
1 changed files with 8 additions and 2 deletions
10
configure.in
10
configure.in
|
@ -43,6 +43,8 @@ AC_MSG_CHECKING(if compiler allows __attribute__)
|
|||
AC_TRY_COMPILE([], [typedef struct { } __attribute__ ((packed)) junk;],
|
||||
[ AC_MSG_RESULT(yes);AC_DEFINE(C_HAS_ATTRIBUTE)],AC_MSG_RESULT(no))
|
||||
|
||||
AM_PATH_ALSA(0.9.0, [AC_DEFINE(HAVE_ALSA, 1, [Define to use ALSA for MIDI])])
|
||||
|
||||
#Check for big endian machine, should #define WORD_BIGENDIAN if so
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
|
@ -63,12 +65,16 @@ AC_ARG_ENABLE(debug,[ --enable-debug Enable debug mode],[
|
|||
AH_TEMPLATE(C_SSHOT,[Define to 1 to enable screenshots, requires libpng])
|
||||
AC_ARG_ENABLE(shots,[ --enable-shots Enable screenshot support],[
|
||||
AC_CHECK_HEADER(png.h,have_png_h=yes,)
|
||||
AC_CHECK_LIB(png, png_check_sig, have_png_lib=yes, , -lz)
|
||||
AC_CHECK_LIB(png, png_check_sig, have_png_lib=yes, ,)
|
||||
AC_CHECK_LIB(png, png_check_sig, have_png_lib_z=yes, , -lz)
|
||||
|
||||
if test x$have_png_lib = xyes -a x$have_png_h = xyes ; then
|
||||
LIBS="$LIBS -lpng"
|
||||
AC_DEFINE(C_SSHOT,1)
|
||||
else
|
||||
else if test x$have_png_lib_z = xyes -a x$have_png_h = xyes ; then
|
||||
LIBS="$LIBS -lpng -lz"
|
||||
AC_DEFINE(C_SSHOT,1)
|
||||
else
|
||||
AC_MSG_WARN([Can't enable screenshots without libpng])
|
||||
fi
|
||||
],)
|
||||
|
|
Loading…
Add table
Reference in a new issue