eg:
bulletmath_suffix="-lbulletmath"
bulletcollision_suffix="-lbulletcollision"
bulletdynamics_suffix="-lbulletdynamics"
dnl Check bulletmath library
AC_CHECK_LIB(bulletmath, btBulletMathProbe, true,
AC_MSG_ERROR([there seems to be a problem with the bulletmath library]))
LIBS="$bulletmath_suffix $LIBS"
dnl Check bulletcollision library
AC_CHECK_LIB(bulletcollision, btBulletCollisionProbe, true,
AC_MSG_ERROR([there seems to be a problem with the bulletcollision library]))
LIBS="$bulletcollision_suffix $LIBS"
dnl Check bulletdynamics library
AC_CHECK_LIB(bulletdynamics, btBulletDynamicsProbe, true,
AC_MSG_ERROR([there seems to be a problem with the bulletdynamics library]))
LIBS="$bulletdynamics_suffix $LIBS"