Index: twinkle-1.4.2/configure.in =================================================================== --- twinkle-1.4.2.orig/configure.in 2013-07-25 11:07:54.264533206 -0400 +++ twinkle-1.4.2/configure.in 2013-07-25 11:07:54.256533340 -0400 @@ -195,22 +195,33 @@ # This check does not work on all platforms # Check if libgsm is available -# AC_CHECK_LIB(gsm, sf_open, [ -# AC_CHECK_HEADER(gsm.h, [], -# [AC_MSG_ERROR([gsm header files missing (gsm.h)])]) -# AC_DEFINE(HAVE_GSM, 1, [Define to 1 if you have the library.]) -# GSM_LIBS="-lgsm" -# echo "LIBS += -lgsm" >> $QT_INCL_PRO -# have_gsm="yes" ], [ -# have_gsm="no" -# GSM_LIBS="\$(top_builddir)/src/audio/gsm/libgsm.a" -# echo "LIBS += ../audio/gsm/libgsm.a" >> $QT_INCL_PRO ]) -have_gsm="no" -GSM_LIBS="\$(top_builddir)/src/audio/gsm/libgsm.a" -echo "LIBS += ../audio/gsm/libgsm.a" >> $QT_INCL_PRO +AC_CHECK_LIB(gsm, sf_open, [ + AC_CHECK_HEADER(gsm.h, [], + [AC_MSG_ERROR([gsm header files missing (gsm.h)])]) + AC_DEFINE(HAVE_GSM, 1, [Define to 1 if you have the library.]) + GSM_LIBS="-lgsm" + echo "LIBS += -lgsm" >> $QT_INCL_PRO + have_gsm="yes" ], [ + have_gsm="no" + GSM_LIBS="\$(top_builddir)/src/audio/gsm/libgsm.a" + echo "LIBS += ../audio/gsm/libgsm.a" >> $QT_INCL_PRO ]) +#have_gsm="no" +#GSM_LIBS="\$(top_builddir)/src/audio/gsm/libgsm.a" +#echo "LIBS += ../audio/gsm/libgsm.a" >> $QT_INCL_PRO AC_SUBST(GSM_LIBS) +# Check if libgsm is available +AC_CHECK_LIB(gsm, sf_open, [ + AC_CHECK_HEADER(gsm.h, [], + [AC_MSG_ERROR([gsm header files missing (gsm.h)])]) + AC_DEFINE(HAVE_GSM, 1, [Define to 1 if you have the library.]) + LIBS="-lgsm $LIBS" + echo "LIBS += -lgsm" >> $QT_INCL_PRO + have_gsm="yes" ], [ + have_gsm="no" + echo "$(top_builddir)/src/audio/gsm/libgsm.a" >> $QT_INCL_PRO ]) + # Check if ALSA is available AC_CHECK_LIB(asound, main, [ AC_CHECK_HEADER(alsa/asoundlib.h, [], @@ -348,3 +359,4 @@ AC_MSG_RESULT([Speex: $have_speex]) AC_MSG_RESULT([iLBC: $have_ilbc]) AC_MSG_RESULT([ZRTP: $have_zrtp]) +AC_MSG_RESULT([Libgsm dynamic link: $have_gsm]) Index: twinkle-1.4.2/src/twinkle_config.h.in =================================================================== --- twinkle-1.4.2.orig/src/twinkle_config.h.in 2013-07-25 11:07:54.264533206 -0400 +++ twinkle-1.4.2/src/twinkle_config.h.in 2013-07-25 11:07:54.256533340 -0400 @@ -19,6 +19,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_HISTORY_H +/* Define to 1 if you have the library. */ +#undef HAVE_GSM + /* Define to 1 if you have the library. */ #undef HAVE_ILBC