$OpenBSD: patch-configure_ac,v 1.1 2015/05/10 11:09:47 sebastia Exp $

postincrement doesn't work with ksh, sent upstream:
https://sourceforge.net/p/srcpd/bugs/18/

--- configure.ac.orig	Sun May 10 13:02:07 2015
+++ configure.ac	Sun May 10 13:03:33 2015
@@ -38,7 +38,7 @@ AC_ARG_ENABLE(ddl,
     [with_DLL="$enableval"], [with_DDL=yes])
 if test "$with_DDL" = "yes"; then
    AC_DEFINE(USE_DDL,1, [define to 1 if you want ddl support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_DDL, test "$with_DDL" = yes)
 
@@ -48,7 +48,7 @@ AC_ARG_ENABLE(ddls88,
     [with_DLL88="$enableval"], [with_DDLS88=yes])
 if test "$with_DDLS88" = "yes"; then
    AC_DEFINE(USE_DDLS88,1, [define to 1 if you want ddl-s88 support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_DDLS88, test "$with_DDLS88" = yes)
 
@@ -58,7 +58,7 @@ AC_ARG_ENABLE(hsi88,
     [with_HSI88="$leval"], [with_HSI88=yes])
 if test "$with_HSI88" = "yes"; then
    AC_DEFINE(USE_HSI88,1,[define to 1 if you want hsi-88 support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_HSI88, test "$with_HSI88" = yes)
 
@@ -68,7 +68,7 @@ AC_ARG_ENABLE(i2cdev,
     [with_I2C="$enableval"], [with_I2C=yes])
 if test "$with_I2C" = "yes"; then
    AC_DEFINE(USE_I2C,1, [define to 1 if you want i2c-dev support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_I2C, test "$with_I2C" = yes)
 
@@ -78,7 +78,7 @@ AC_ARG_ENABLE(intellibox,
     [with_IB="$enableval"], [with_IB=yes])
 if test "$with_IB" = "yes"; then
    AC_DEFINE(USE_IB,1,[define to 1 if you want intellibox support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_IB, test "$with_IB" = yes)
 
@@ -88,7 +88,7 @@ AC_ARG_ENABLE(li100,
     [with_LI100="$enableval"], [with_LI100=yes])
 if test "$with_LI100" = "yes"; then
    AC_DEFINE(USE_LI100,1,[define to 1 if you want li100 (RS232 + USB) support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_LI100, test "$with_LI100" = yes)
 
@@ -98,7 +98,7 @@ AC_ARG_ENABLE(loconet,
     [with_LOCONET="$enableval"], [with_LOCONET=yes])
 if test "$with_LOCONET" = "yes"; then
    AC_DEFINE(USE_LOCONET,1, [define to 1 if you want loconet support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_LOCONET, test "$with_LOCONET" = yes)
 
@@ -108,7 +108,7 @@ AC_ARG_ENABLE(loopback,
     [with_LOOPBACK="$enableval"], [with_LOOPBACK=yes])
 if test "$with_LOOPBACK" = "yes"; then
    AC_DEFINE(USE_LOOPBACK,1, [define to 1 if you want loopback support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_LOOPBACK, test "$with_LOOPBACK" = yes)
 
@@ -118,7 +118,7 @@ AC_ARG_ENABLE(m605x,
     [with_M605X="$enableval"], [with_M605X=yes])
 if test "$with_M605X" = "yes"; then
    AC_DEFINE(USE_M605X,1, [define to 1 if you want m605x support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_M605X, test "$with_M605X" = yes)
 
@@ -128,7 +128,7 @@ AC_ARG_ENABLE(selectrix,
     [with_SELECTRIX="$enableval"], [with_SELECTRIX=yes])
 if test "$with_SELECTRIX" = "yes"; then
    AC_DEFINE(USE_SELECTRIX,1,[define to 1 if you want selectrix support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_SELECTRIX, test "$with_SELECTRIX" = yes)
 
@@ -138,7 +138,7 @@ AC_ARG_ENABLE(zimo,
     [with_ZIMO="$enableval"], [with_ZIMO=yes])
 if test "$with_ZIMO" = "yes"; then
    AC_DEFINE(USE_ZIMO,1, [define to 1 if you want zimo support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_ZIMO, test "$with_ZIMO" = yes)
 
@@ -148,7 +148,7 @@ AC_ARG_ENABLE(dccar,
     [with_DCCAR="$enableval"], [with_DCCAR=yes])
 if test "$with_DCCAR" = "yes"; then
    AC_DEFINE(USE_DCCAR,1, [define to 1 if you want dccar support])
-   ((NUM_MODULES++))
+   NUM_MODULES=`expr $NUM_MODULES + 1`
 fi
 AM_CONDITIONAL(USE_DCCAR, test "$with_DCCAR" = yes)
 
@@ -338,7 +338,7 @@ if test "$with_ZIMO"      != "yes"; then echo "    zim
 if test "$with_DCCAR"     != "yes"; then echo "    dccar"; fi
 
 echo
-if ((NUM_MODULES == 0)); then
+if test $NUM_MODULES == 0; then
     echo 'Warning: No device module configured; srcpd will not run propperly!'
 else
     echo "Run 'make' to continue."
