X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=configure.ac;h=f8123d21aa7769defe0fe607b784f7a4fcae182b;hb=59182fbbbf79b31552f84f875485bfaee1a34270;hp=96d5277bb23a5204682365a0582ea2f04d823250;hpb=ad7498553c7951ae5a559bd25512297be253696c;p=libserialport.git diff --git a/configure.ac b/configure.ac index 96d5277..f8123d2 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,21 @@ AC_CHECK_MEMBERS([struct termios.c_ispeed, struct termios.c_ospeed], AC_CHECK_MEMBERS([struct termios2.c_ispeed, struct termios2.c_ospeed], [AC_DEFINE(HAVE_TERMIOS2_SPEED, 1)], [], [[#include ]]) +# Check for the BOTHER definition, needed for setting arbitrary baud rates. +# We can't just #ifdef BOTHER in the code, because of the separation between +# code using libc headers and code using kernel termios.h headers. +AC_MSG_CHECKING(for BOTHER) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include +]], +[[ +#ifndef BOTHER +#error BOTHER is not defined +#endif +]])], +[AC_DEFINE(HAVE_BOTHER, 1) +AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) + # Check for serial_struct. AC_CHECK_TYPE([struct serial_struct], [AC_DEFINE(HAVE_SERIAL_STRUCT, 1)], [], [[#include ]])