Blob Blame History Raw
configure.ac: Use AC_USE_SYSTEM_EXTENSIONS

And to make it effective, include <config.c> at the start of C files
(except those compiled from Vala).  This is necessary to obtain a
declaration of ptsname in <stdlib.h>.

Also declare the AS_* macros for autoconf 2.71 compatibility.

Submitted upstream: <https://github.com/fujiwarat/ibus-fbterm/pull/1>

diff --git a/backend/fbio.c b/backend/fbio.c
index 2593b6c73021381d..803c3efa061c4f16 100644
--- a/backend/fbio.c
+++ b/backend/fbio.c
@@ -17,6 +17,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+#include <config.h>
+
 #include <glib.h>
 
 #include <errno.h>
diff --git a/backend/fbshell.c b/backend/fbshell.c
index 12f55542f1c35029..809d013160c175fd 100644
--- a/backend/fbshell.c
+++ b/backend/fbshell.c
@@ -17,6 +17,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+#include <config.h>
+
 #include <glib.h>
 
 #define _XOPEN_SOURCE
diff --git a/backend/fbshellman.c b/backend/fbshellman.c
index e8bf34f083914a95..4d8a147ff7d90a93 100644
--- a/backend/fbshellman.c
+++ b/backend/fbshellman.c
@@ -17,6 +17,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+#include <config.h>
+
 #include <glib.h>
 
 #include <string.h>
diff --git a/backend/fbterm.c b/backend/fbterm.c
index e313bd1c35f3ff2b..114b16dc7f39a221 100644
--- a/backend/fbterm.c
+++ b/backend/fbterm.c
@@ -17,6 +17,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+#include <config.h>
+
 #include <glib.h>
 
 #include <linux/kdev_t.h> /* MINOR() */
diff --git a/backend/fbtty.c b/backend/fbtty.c
index e8fb601711667b54..6b3a5cb616723487 100644
--- a/backend/fbtty.c
+++ b/backend/fbtty.c
@@ -17,6 +17,8 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+#include <config.h>
+
 #include <glib.h>
 
 #include <linux/kd.h>
diff --git a/configure.ac b/configure.ac
index 01d909891415ac91..ac1eb641ac1e382e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,8 +7,10 @@ AC_INIT([ibus-fbterm], [1.0.1],
         [ibus-fbterm])
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADERS([config.h])
+AC_USE_SYSTEM_EXTENSIONS
 
 # Checks for programs.
+m4_pattern_allow([^AS_(VERSION|NANO)$])
 AS_VERSION
 AS_NANO
 AC_PROG_CC