dnl This is a little s script written by Rob Flynn of Linux Support Services, Inc. dnl Hopefully, it will allow better detection of the GSM libraries. Who knows ;-) dnl If you have any patches, send them to: dnl dnl rob@linux-support.net dnl dnl Thanks! :-) dnl AC_DEFUN(GSM_LIBS_CHECK,[ AC_ARG_WITH(gsmlibrary, [ --with-gsmlibrary Location of GSM library)], [gsmlibrary="$withval"], [gsmlibrary=detect]) AC_ARG_WITH(gsminclude, [ --with-gsminclude Location of GSM headers)], [gsminclude="$withval"], [gsminclude=detect]) dnl If they specified a location for the GSM libraries, let's add it to our dnl path. if test "$gsmlibrary" != "detect" ; then LIBS="$LIBS -L$gsmlibrary" fi old_CFLAGS="$CFLAGS" if test "$gsminclude" != "detect" ; then CFLAGS="$CFLAGS -I$gsminclude" if test \! -z "$gsminclude" ; then CPPFLAGS="$CPPFLAGS -I$gsminclude" fi fi AC_CHECK_HEADER(gsm.h,hasgsm=yes, AC_MSG_ERROR([ * You must have the GSM Headers installed before continuing. * Install them or try configure --with-gsminclude=path_to_gsm_headers ])) if test "$hasgsm" = yes; then AC_CHECK_LIB(gsm, main, LIBGSM="-lgsm", AC_MSG_ERROR([You must have the GSM libraries installed before continuing. Install them or try --with-gsmlibrary=path_to_gsm_libs])) else CFLAGS="$old_CFLAGS" fi AC_SUBST(CFLAGS) AC_SUBST(LIBS) ])