aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-01-28 01:05:06 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-01-28 01:05:06 +0000
commit09cd7db47591a4289dd4ff07cc516b0ec95b62a0 (patch)
tree2ca425700cf1c97a487ed0ad31559c83dc8aaa4d
parent6b2aa4a4a7816d604ee63c974131c03fed9a4b7c (diff)
streamlined autotools build to be the minimum needed
svn path=/trunk/externals/io/hidio/; revision=13108
-rw-r--r--Makefile.am23
-rw-r--r--configure.ac53
2 files changed, 36 insertions, 40 deletions
diff --git a/Makefile.am b/Makefile.am
index ca00a6f..42fd1d6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,33 +1,30 @@
AUTOMAKE_OPTIONS = foreign
-noinst_PROGRAMS = hidio
-hidio_SOURCES = hidio.c hidio_types.c
-hidio_CFLAGS = $(CFLAGS)
-hidio_LDADD =
-hidio_LDFLAGS = $(LDFLAGS)
+noinst_PROGRAMS = hidio.@EXTENSION@
+SOURCES = hidio.c hidio_types.c
+LDADD =
+
noinst_HEADERS = hidio.h input_arrays.h
EXTRA_SUBDIRS =
if MACOSX
-hidio_SOURCES += hidio_darwin.c
+SOURCES += hidio_darwin.c
EXTRA_SUBDIRS += HID_Utilities_Source
-hidio_CFLAGS += -IHID_Utilities_Source
-hidio_LDADD += HID_Utilities_Source/libHIDUtilities.a
-hidio_LDFLAGS += -bundle -undefined dynamic_lookup \
+LDADD += HID_Utilities_Source/libHIDUtilities.a
+CFLAGS += -IHID_Utilities_Source
+LDFLAGS += -bundle -undefined dynamic_lookup \
-framework Carbon -framework IOKit -framework ForceFeedback
endif
if LINUX
-hidio_SOURCES += hidio_linux.c input_arrays.c
+SOURCES += hidio_linux.c input_arrays.c
endif
if WINDOWS
-hidio_SOURCES += hidio_windows.c
+SOURCES += hidio_windows.c
endif
-
-
# files that are included but not built
EXTRA_DIST = COPYING README TODO
diff --git a/configure.ac b/configure.ac
index 5c8c9b6..706f5cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,24 +4,28 @@ AC_CONFIG_SRCDIR(hidio.c)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(1.9)
-CFLAGS="-DPD $CFLAGS"
-INCLUDES="-I../../../pd/src $INCLUDES"
+PD_PATH=../../../pd
+CFLAGS="-DPD $CFLAGS -I$PD_PATH/src"
case $host in
*darwin*)
- MACOSX=yes
- ;;
+ MACOSX=yes
+ EXTENSION=pd_darwin
+ ;;
*linux*)
- LINUX=yes
- ;;
+ LINUX=yes
+ EXTENSION=pd_linux
+ ;;
*mingw*)
- WINDOWS=yes
- MINGW=yes
- ;;
+ WINDOWS=yes
+ MINGW=yes
+ EXTENSION=dll
+ ;;
*cygwin*)
- WINDOWS=yes
- CYGWIN=yes
- ;;
+ WINDOWS=yes
+ CYGWIN=yes
+ EXTENSION=dll
+ ;;
esac
AM_CONDITIONAL(ANDROID, test x$ANDROID = xyes)
AM_CONDITIONAL(IPHONEOS, test x$IPHONEOS = xyes)
@@ -38,21 +42,20 @@ AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_MAKE_SET
-AC_SUBST(EXTERNTARGET)
-AC_SUBST(INCLUDES)
+AC_SUBST(EXTENSION)
AC_HEADER_STDC
AC_ARG_ENABLE([debug],
- [AS_HELP_STRING([--enable-debug], [use debugging support])],
- [debug=$enableval])
+ [AS_HELP_STRING([--enable-debug], [use debugging support])],
+ [debug=$enableval])
if test x$debug = xyes; then
CFLAGS="$CFLAGS -g"
fi
AC_ARG_ENABLE([universal],
- [AS_HELP_STRING([--enable-universal],
- [build universal binary on Mac OS X])],
+ [AS_HELP_STRING([--enable-universal],
+ [build universal binary on Mac OS X])],
[universal=$enableval], [universal=no])
AM_CONDITIONAL(UNIVERSAL, test x$universal = xyes)
if test x$universal = xyes; then
@@ -62,23 +65,19 @@ if test x$universal = xyes; then
fi
# Checks for header files.
-AC_FUNC_ALLOCA
-AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stddef.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h unistd.h])
+AC_CHECK_HEADERS([malloc.h string.h sys/time.h])
# Checks for typedefs, structures, and compiler characteristics.
-AC_TYPE_INT16_T
-AC_TYPE_INT32_T
-AC_TYPE_OFF_T
-AC_TYPE_PID_T
+dnl AC_TYPE_INT16_T
+dnl AC_TYPE_INT32_T
+dnl AC_TYPE_OFF_T
+dnl AC_TYPE_PID_T
AC_TYPE_SIZE_T
# Checks for library functions.
-AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_FUNC_MALLOC
-AC_FUNC_REALLOC
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([getcwd memmove memset pow regcomp select socket strchr strrchr strstr strtol])
# Specify what files are to be created.
AC_CONFIG_FILES([Makefile