-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.in
More file actions
68 lines (56 loc) · 1.62 KB
/
Copy pathconfigure.in
File metadata and controls
68 lines (56 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.in)
PACKAGE="rtlinux_plc"
VERSION="$Revision: 1.3 $"
dnl Check for programs
AC_PROG_CC
AC_PROG_CXX
AC_PROG_YACC
AC_PROG_LEX
AC_PROG_INSTALL
dnl Check for library functions
dnl Check for RT-Linux installed
AC_MSG_CHECKING(Searching for RT-Linux (rtl-config))
if (test -n `which rtl-config`); then
AC_MSG_RESULT(found)
rtl-config --mk > rtl.mk
else
AC_MSG_ERROR(not found on search path)
fi
dnl Check for kernel modules directory
AC_MSG_CHECKING(Searching kernel modules directory)
if (test -d "/lib/modules/"`uname -r`); then
AC_MSG_RESULT(found)
KERNEL_MODULES="/lib/modules/"`uname -r`"/misc"
fi
dnl Setting makefiles names
AC_MSG_CHECKING(Searching for Makefile's)
for x in `find . -name Makefile.in`; do
F=`echo $x|sed 's/.in$//g'`;
MAKEFILES="$MAKEFILES $F";
done
AC_MSG_RESULT(done)
dnl Search test modules for PLC library
AC_MSG_CHECKING(Searching for kernel library tests)
for x in `pwd`/kernel-library/tests/t_*.cpp; do
TOBJ=`echo $x|sed 's/^\(.*\)\/t_\(.*\).cpp/\2/g'`;
TEST_OBJECTS="$TEST_OBJECTS t_$TOBJ.o";
TEST_SOURCES="$TEST_SOURCES t_$TOBJ.cpp";
done
AC_MSG_RESULT(done)
MAKEFILES="$MAKEFILES Rules.mk Make.flags";
INCLUDES="-I`pwd`/kernel-library/include -I`pwd`/plc2cpp/include"
PLC_LIBS="`pwd`/lib"
CFLAGS="$CFLAGS $INCLUDES"
CXXFLAGS="$CXXFLAGS $INCLUDES"
LDFLAGS="$LFLAGS -L$PLC_LIBS -lpthread"
MAKEFILES="$MAKEFILES plc2cpp/mkplc.sh"
AC_SUBST(KERNEL_MODULES)
AC_SUBST(OBJECTS)
AC_SUBST(MAKEFILES)
AC_SUBST(PLC_LIBS)
AC_SUBST(TEST_OBJECTS)
AC_SUBST(TEST_SOURCES)
AC_SUBST(PTEST_OBJECTS)
AC_SUBST(PTEST_SOURCES)
AC_OUTPUT($MAKEFILES)