configure.ac
branchstable-1.5
changeset 2540 fca12d7035d1
parent 2532 bdadf6da4914
child 2556 674fcdccc0f3
equal deleted inserted replaced
2539:d2d43d2e7f31 2540:fca12d7035d1
    55 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    55 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
    56 AC_PROG_CXX
    56 AC_PROG_CXX
    57 AC_PROG_LIBTOOL
    57 AC_PROG_LIBTOOL
    58 
    58 
    59 #------------------------------------------------------------------------------
    59 #------------------------------------------------------------------------------
       
    60 # Kernel modules
       
    61 #------------------------------------------------------------------------------
       
    62 
       
    63 AC_MSG_CHECKING([whether to build kernel modules])
       
    64 
       
    65 AC_ARG_ENABLE([kernel],
       
    66     AS_HELP_STRING([--enable-kernel],
       
    67                    [Enable building kernel modules]),
       
    68     [
       
    69         case "${enableval}" in
       
    70             yes) enablekernel=1
       
    71                 ;;
       
    72             no) enablekernel=0
       
    73                 ;;
       
    74             *) AC_MSG_ERROR([Invalid value for --enable-generic])
       
    75                 ;;
       
    76         esac
       
    77     ],
       
    78     [enablekernel=1]
       
    79 )
       
    80 
       
    81 if test "x$enablekernel" = "x1"; then
       
    82     AC_MSG_RESULT([yes])
       
    83 else
       
    84     AC_MSG_RESULT([no])
       
    85 fi
       
    86 
       
    87 AM_CONDITIONAL(ENABLE_KERNEL, test "x$enablekernel" = "x1")
       
    88 AC_SUBST(ENABLE_KERNEL,[$enablekernel])
       
    89 
       
    90 #------------------------------------------------------------------------------
    60 # Linux sources
    91 # Linux sources
    61 #------------------------------------------------------------------------------
    92 #------------------------------------------------------------------------------
       
    93 
       
    94 if test "x$enablekernel" = "x1"; then
    62 
    95 
    63 AC_ARG_WITH([linux-dir],
    96 AC_ARG_WITH([linux-dir],
    64     AC_HELP_STRING(
    97     AC_HELP_STRING(
    65         [--with-linux-dir=<DIR>],
    98         [--with-linux-dir=<DIR>],
    66         [Linux kernel sources @<:@running kernel@:>@]
    99         [Linux kernel sources @<:@running kernel@:>@]
   114 linuxversion=`echo $kernelrelease | grep -oE "$regex"`
   147 linuxversion=`echo $kernelrelease | grep -oE "$regex"`
   115 
   148 
   116 AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir])
   149 AC_SUBST(LINUX_SOURCE_DIR,[$sourcedir])
   117 AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $linuxversion)])
   150 AC_MSG_RESULT([$LINUX_SOURCE_DIR (Kernel $linuxversion)])
   118 
   151 
       
   152 fi
       
   153 
   119 #------------------------------------------------------------------------------
   154 #------------------------------------------------------------------------------
   120 # Linux module installation subdirectory
   155 # Linux module installation subdirectory
   121 #------------------------------------------------------------------------------
   156 #------------------------------------------------------------------------------
   122 
   157 
   123 AC_ARG_WITH([module-dir],
   158 AC_ARG_WITH([module-dir],
   148                 ;;
   183                 ;;
   149             *) AC_MSG_ERROR([Invalid value for --enable-generic])
   184             *) AC_MSG_ERROR([Invalid value for --enable-generic])
   150                 ;;
   185                 ;;
   151         esac
   186         esac
   152     ],
   187     ],
   153     [enablegeneric=1]
   188     [enablegeneric=$enablekernel]
   154 )
   189 )
   155 
   190 
   156 AM_CONDITIONAL(ENABLE_GENERIC, test "x$enablegeneric" = "x1")
   191 AM_CONDITIONAL(ENABLE_GENERIC, test "x$enablegeneric" = "x1")
   157 AC_SUBST(ENABLE_GENERIC,[$enablegeneric])
   192 AC_SUBST(ENABLE_GENERIC,[$enablegeneric])
   158 
   193 
   171                 ;;
   206                 ;;
   172             *) AC_MSG_ERROR([Invalid value for --enable-8139too])
   207             *) AC_MSG_ERROR([Invalid value for --enable-8139too])
   173                 ;;
   208                 ;;
   174         esac
   209         esac
   175     ],
   210     ],
   176     [enable8139too=1]
   211     [enable8139too=$enablekernel]
   177 )
   212 )
   178 
   213 
   179 AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1")
   214 AM_CONDITIONAL(ENABLE_8139TOO, test "x$enable8139too" = "x1")
   180 AC_SUBST(ENABLE_8139TOO,[$enable8139too])
   215 AC_SUBST(ENABLE_8139TOO,[$enable8139too])
   181 
   216