Girish Gowdra | e538dfd | 2019-09-30 11:07:30 +0530 | [diff] [blame] | 1 | # -*- Autoconf -*- |
| 2 | # Process this file with autoconf to produce a configure script. |
| 3 | |
| 4 | AC_PREREQ([2.69]) |
| 5 | AC_INIT([openolt], [1.4.0], [voltha-discuss@opencord.org]) |
| 6 | AC_CONFIG_SRCDIR([config.h.in]) |
| 7 | AC_CONFIG_HEADERS([config.h]) |
| 8 | |
| 9 | AC_ARG_WITH(sysroot, |
| 10 | [AS_HELP_STRING([--with-sysroot[=DIR]], [search for usr/include, usr/lib, usr/lib64 etal within DIR])], |
| 11 | [ |
| 12 | sysroot=$withval |
| 13 | |
| 14 | if test "$sysroot" = "yes"; then |
| 15 | sysroot='${exec_prefix}/${target_alias}/sys-root' |
| 16 | elif test "$sysroot" = "no"; then |
| 17 | sysroot= |
| 18 | fi |
| 19 | |
| 20 | if test "x$sysroot" != x; then |
| 21 | CXXFLAGS="$CXXFLAGS --sysroot=$sysroot" |
| 22 | LDFLAGS="$LDFLAGS --sysroot=$sysroot" |
| 23 | fi |
| 24 | ], []) |
| 25 | |
| 26 | # Checks for programs. |
| 27 | AC_PROG_CXX |
| 28 | AC_PROG_CC |
| 29 | AC_PROG_AWK |
| 30 | AC_PROG_SED |
| 31 | AC_PROG_LN_S |
| 32 | AC_PROG_MAKE_SET |
| 33 | |
| 34 | # Checks for libraries. |
| 35 | AC_CHECK_LIB([dl], [main]) |
| 36 | AC_CHECK_LIB([pthread], [main]) |
| 37 | |
| 38 | # Checks for header files. |
| 39 | AC_CHECK_HEADERS([unistd.h]) |
| 40 | |
| 41 | # Checks for typedefs, structures, and compiler characteristics. |
| 42 | AC_CHECK_HEADER_STDBOOL |
| 43 | AC_C_INLINE |
| 44 | AC_TYPE_UINT16_T |
| 45 | AC_TYPE_UINT32_T |
| 46 | AC_TYPE_UINT8_T |
| 47 | |
| 48 | # Checks for library functions. |
| 49 | AC_FUNC_MALLOC |
| 50 | AC_CHECK_FUNCS([memset strtol]) |
| 51 | |
| 52 | AC_CONFIG_FILES([Makefile]) |
| 53 | AC_OUTPUT |