]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - configure.ac
TEMP: smp: Disable SMP for now for A53
[ipc/ipcdev.git] / configure.ac
1 #
2 #   Copyright (c) 2013-2018 Texas Instruments Incorporated - http://www.ti.com
3 #
4 #   Redistribution and use in source and binary forms, with or without
5 #   modification, are permitted provided that the following conditions
6 #   are met:
7 #
8 #   *  Redistributions of source code must retain the above copyright
9 #      notice, this list of conditions and the following disclaimer.
10 #
11 #   *  Redistributions in binary form must reproduce the above copyright
12 #      notice, this list of conditions and the following disclaimer in the
13 #      documentation and/or other materials provided with the distribution.
14 #
15 #   *  Neither the name of Texas Instruments Incorporated nor the names of
16 #      its contributors may be used to endorse or promote products derived
17 #      from this software without specific prior written permission.
18 #
19 #   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 #   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 #   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 #   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 #   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 #   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 #   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26 #   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 #   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 #   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
29 #   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #
31 # ======== configure.ac ========
32 #
34 # Process this file with autoconf to produce a configure script.
35 AC_PREREQ(2.59)
37 # Initilize autoconf
38 AC_INIT(TI IPC, 3.0.0, )
40 # Check common src files to ensure integrity of the package
41 AC_CONFIG_SRCDIR([packages/ti/ipc/MessageQ.h])
43 # Set auxiliary build tools directory
44 AC_CONFIG_AUX_DIR([linux/build-aux])
46 # Initilize automake
47 AM_INIT_AUTOMAKE([foreign])
49 # Disabling maintainer mode to prevent rebuild of configure script
50 AM_MAINTAINER_MODE([disable])
52 # Initalize libtool but disable fortran check
53 LT_INIT
54 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
55 AC_PROG_LIBTOOL(gcc)
57 # Checks for programs.
58 AC_PROG_CC(gcc)
59 AC_PROG_INSTALL
61 # Checks for header files.
62 AC_HEADER_STDC
63 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h])
65 # Export CFLAGS and LDFLAGS to Makefile(s)
66 AC_SUBST([AM_CFLAGS])
67 AC_SUBST([AM_LDFLAGS])
69 # Add config variables/options and check them
70 # Note that 6614 isn't documented and, though it may work, is planned for removal
71 AC_ARG_VAR(PLATFORM, Platform to build. Options are: 'OMAPL138' 'OMAP54XX' '66AK2E' 'TCI6630' 'TCI6636' 'TCI6638' '66AK2G' 'DRA7XX' and 'AM65XX'. If not defined all platforms will be built.)
72 AC_ARG_VAR(CMEM_INSTALL_DIR, Installation path directory to the CMEM libraries)
73 AC_ARG_VAR(KERNEL_INSTALL_DIR, Installation path to the Linux kernel.)
74 AC_ARG_VAR(AF_RPMSG, Address Family used by the RPMSG driver)
75 AC_ARG_VAR(DRM_PREFIX, Installation location to the DRM library.)
77 # Test platform variable for setting
78 AS_IF([test "x$PLATFORM" = "xOMAPL138"],
79   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
80   [AS_IF([test "x$PLATFORM" = "x66AK2E"],
81   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
82   [AS_IF([test "x$PLATFORM" = "xTCI6614"],
83   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
84   [AS_IF([test "x$PLATFORM" = "xTCI6630"],
85   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
86   [AS_IF([test "x$PLATFORM" = "xTCI6636"],
87   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
88   [AS_IF([test "x$PLATFORM" = "xTCI6638"],
89   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
90   [AS_IF([test "x$PLATFORM" = "x66AK2G"],
91   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
92   [AS_IF([test "x$PLATFORM" = "xOMAP54XX"],
93   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
94   [AS_IF([test "x$PLATFORM" = "xDRA7XX"],
95   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
96   [AS_IF([test "x$PLATFORM" = "xAM65XX"],
97   [AC_MSG_NOTICE([PLATFORM is set to ${PLATFORM}])],
98   [AS_IF([test "x$PLATFORM" = "x"],
99   [AC_MSG_NOTICE([PLATFORM is not set. All supported platforms will be built ....])],
100   [AC_MSG_ERROR([PLATFORM is set to "${PLATFORM}": run ./configure --help for available PLATFORM options])])])])])])])])])])])])
102 # If platform is specified, make sure at least one of
103 # KERNEL_INSTALL_DIR or AF_MSG are set.
104 AS_IF([test -n "$PLATFORM" -a -z "$KERNEL_INSTALL_DIR" -a -z "$AF_RPMSG"],
105   [AC_MSG_ERROR([Must set at least one of KERNEL_INSTALL_DIR or AF_RPMSG])])
107 # Ignore KERNEL path when no platform is set
108 AS_IF([test "x$PLATFORM" = "x"], [KERNEL_INSTALL_DIR=])
109 AS_IF([test "x$PLATFORM" = "x"], [DRM_PREFIX=])
110 AS_IF([test "x$PLATFORM" = "x"], [CMEM_INSTALL_DIR=])
112 # Export optional user variable to Makefile(s)
113 AC_SUBST([PLATFORM])
114 AC_SUBST([CMEM_INSTALL_DIR])
115 AC_SUBST([KERNEL_INSTALL_DIR])
116 AC_SUBST([AF_RPMSG])
117 AC_SUBST([DRM_PREFIX])
119 # Define specific variables to be used in Makefile.am
120 AM_CONDITIONAL([OMAPL138], [test "x$PLATFORM" = "xOMAPL138"])
121 AM_CONDITIONAL([C66AK2E],  [test "x$PLATFORM" = "x66AK2E"])
122 AM_CONDITIONAL([TCI6614], [test "x$PLATFORM" = "xTCI6614"])
123 AM_CONDITIONAL([TCI6630], [test "x$PLATFORM" = "xTCI6630"])
124 AM_CONDITIONAL([TCI6636], [test "x$PLATFORM" = "xTCI6636"])
125 AM_CONDITIONAL([TCI6638], [test "x$PLATFORM" = "xTCI6638"])
126 AM_CONDITIONAL([C66AK2G], [test "x$PLATFORM" = "x66AK2G"])
127 AM_CONDITIONAL([OMAP54XX_SMP], [test "x$PLATFORM" = "xOMAP54XX"])
128 AM_CONDITIONAL([DRA7XX], [test "x$PLATFORM" = "xDRA7XX"])
129 AM_CONDITIONAL([AM65XX], [test "x$PLATFORM" = "xAM65XX"])
130 AM_CONDITIONAL([CMEM], [test "x$CMEM_INSTALL_DIR" != "x"])
131 AM_CONDITIONAL([KDIR], [test "x$KERNEL_INSTALL_DIR" != "x"])
132 AM_CONDITIONAL([KERNEL_INSTALL_DIR], [test -n "$KERNEL_INSTALL_DIR"])
133 AM_CONDITIONAL([DRM], [test "x$DRM_PREFIX" != "x"])
134 AM_CONDITIONAL([AF_RPMSG], [test -n "$AF_RPMSG"])
136 # Generate Makefile(s)
137 AC_CONFIG_FILES([Makefile])
138 AC_CONFIG_FILES([linux/etc/Makefile])
139 AC_CONFIG_FILES([linux/src/utils/Makefile])
140 AC_CONFIG_FILES([linux/src/utils/libtiipcutils.pc])
141 AC_CONFIG_FILES([linux/src/api/Makefile])
142 AC_CONFIG_FILES([linux/src/api/libtiipc.pc])
143 AC_CONFIG_FILES([linux/src/mm/Makefile])
144 AC_CONFIG_FILES([linux/src/mm/libmmrpc.pc])
145 AC_CONFIG_FILES([linux/src/daemon/Makefile])
146 AC_CONFIG_FILES([linux/src/tests/Makefile])
147 AC_CONFIG_FILES([linux/src/transport/Makefile])
148 AC_OUTPUT
150 echo \
151 "-----------------------------------------------------------
153 Thank you for installing the Linux ${PACKAGE_NAME} package
155 Installation directory prefix: '${prefix}'.
156 Compilation command: '${CC} ${CFLAGS} ${CPPFLAGS}'
158 You have configured to build for the '${PLATFORM}' platform
160 Your KERNEL installation directory is set to:
161     '${KERNEL_INSTALL_DIR}'
163 Your DRM installation directory is set to:
164     '${DRM_PREFIX}'
166 Your CMEM installation directory is set to:
167     '${CMEM_INSTALL_DIR}'
169 Now type 'make; sudo make install' to generate the program
170 and install it to your system.
172 ------------------------------------------------------------"