configure.ac
branchstable-1.5
changeset 2509 232831b6249b
parent 2508 6b21b3f88a9a
child 2514 e2257824c563
equal deleted inserted replaced
2508:6b21b3f88a9a 2509:232831b6249b
   560 
   560 
   561 #------------------------------------------------------------------------------
   561 #------------------------------------------------------------------------------
   562 # Debug interface
   562 # Debug interface
   563 #------------------------------------------------------------------------------
   563 #------------------------------------------------------------------------------
   564 
   564 
       
   565 AC_MSG_CHECKING([whether to build the debug interface])
       
   566 
   565 AC_ARG_ENABLE([debug-if],
   567 AC_ARG_ENABLE([debug-if],
   566     AS_HELP_STRING([--enable-debug-if],
   568     AS_HELP_STRING([--enable-debug-if],
   567                    [Create a debug interface for each master @<:@NO@:>@]),
   569                    [Create a debug interface for each master @<:@NO@:>@]),
   568     [
   570     [
   569         case "${enableval}" in
   571         case "${enableval}" in
   578     [dbg=0]
   580     [dbg=0]
   579 )
   581 )
   580 
   582 
   581 if test "x${dbg}" = "x1"; then
   583 if test "x${dbg}" = "x1"; then
   582     AC_DEFINE([EC_DEBUG_IF], [1], [Debug interfaces enabled])
   584     AC_DEFINE([EC_DEBUG_IF], [1], [Debug interfaces enabled])
   583 fi
   585     AC_MSG_RESULT([yes])
       
   586 else
       
   587     AC_MSG_RESULT([no])
       
   588 fi
       
   589 
   584 AM_CONDITIONAL(ENABLE_DEBUG_IF, test "x$dbg" = "x1")
   590 AM_CONDITIONAL(ENABLE_DEBUG_IF, test "x$dbg" = "x1")
   585 AC_SUBST(ENABLE_DEBUG_IF,[$dbg])
   591 AC_SUBST(ENABLE_DEBUG_IF,[$dbg])
   586 
   592 
   587 #------------------------------------------------------------------------------
   593 #------------------------------------------------------------------------------
   588 # Debug ring
   594 # Debug ring
   589 #------------------------------------------------------------------------------
   595 #------------------------------------------------------------------------------
       
   596 
       
   597 AC_MSG_CHECKING([whether to build the debug ring])
   590 
   598 
   591 AC_ARG_ENABLE([debug-ring],
   599 AC_ARG_ENABLE([debug-ring],
   592     AS_HELP_STRING([--enable-debug-ring],
   600     AS_HELP_STRING([--enable-debug-ring],
   593                    [Create a debug ring to record frames @<:@NO@:>@]),
   601                    [Create a debug ring to record frames @<:@NO@:>@]),
   594     [
   602     [
   604     [debugring=0]
   612     [debugring=0]
   605 )
   613 )
   606 
   614 
   607 if test "x${debugring}" = "x1"; then
   615 if test "x${debugring}" = "x1"; then
   608     AC_DEFINE([EC_DEBUG_RING], [1], [Debug ring enabled])
   616     AC_DEFINE([EC_DEBUG_RING], [1], [Debug ring enabled])
       
   617     AC_MSG_RESULT([yes])
       
   618 else
       
   619     AC_MSG_RESULT([no])
   609 fi
   620 fi
   610 
   621 
   611 #------------------------------------------------------------------------------
   622 #------------------------------------------------------------------------------
   612 # Ethernet over EtherCAT support
   623 # Ethernet over EtherCAT support
   613 #------------------------------------------------------------------------------
   624 #------------------------------------------------------------------------------
       
   625 
       
   626 AC_MSG_CHECKING([whether to build with EoE support])
   614 
   627 
   615 AC_ARG_ENABLE([eoe],
   628 AC_ARG_ENABLE([eoe],
   616     AS_HELP_STRING([--enable-eoe],
   629     AS_HELP_STRING([--enable-eoe],
   617                    [Enable EoE support (default: yes)]),
   630                    [Enable EoE support (default: yes)]),
   618     [
   631     [
   628     [eoe=1]
   641     [eoe=1]
   629 )
   642 )
   630 
   643 
   631 if test "x${eoe}" = "x1"; then
   644 if test "x${eoe}" = "x1"; then
   632     AC_DEFINE([EC_EOE], [1], [EoE support enabled])
   645     AC_DEFINE([EC_EOE], [1], [EoE support enabled])
   633 fi
   646     AC_MSG_RESULT([yes])
       
   647 else
       
   648     AC_MSG_RESULT([no])
       
   649 fi
       
   650 
   634 AM_CONDITIONAL(ENABLE_EOE, test "x$eoe" = "x1")
   651 AM_CONDITIONAL(ENABLE_EOE, test "x$eoe" = "x1")
   635 AC_SUBST(ENABLE_EOE,[$eoe])
   652 AC_SUBST(ENABLE_EOE,[$eoe])
   636 
   653 
   637 #------------------------------------------------------------------------------
   654 #------------------------------------------------------------------------------
   638 # CPU timestamp counter support
   655 # CPU timestamp counter support
   639 #------------------------------------------------------------------------------
   656 #------------------------------------------------------------------------------
       
   657 
       
   658 AC_MSG_CHECKING([whether to use the CPU timestamp counter])
   640 
   659 
   641 AC_ARG_ENABLE([cycles],
   660 AC_ARG_ENABLE([cycles],
   642     AS_HELP_STRING([--enable-cycles],
   661     AS_HELP_STRING([--enable-cycles],
   643                    [Use CPU timestamp counter (default: no)]),
   662                    [Use CPU timestamp counter (default: no)]),
   644     [
   663     [
   654     [cycles=0]
   673     [cycles=0]
   655 )
   674 )
   656 
   675 
   657 if test "x${cycles}" = "x1"; then
   676 if test "x${cycles}" = "x1"; then
   658     AC_DEFINE([EC_HAVE_CYCLES], [1], [Use CPU timestamp counter])
   677     AC_DEFINE([EC_HAVE_CYCLES], [1], [Use CPU timestamp counter])
       
   678     AC_MSG_RESULT([yes])
       
   679 else
       
   680     AC_MSG_RESULT([no])
   659 fi
   681 fi
   660 
   682 
   661 #------------------------------------------------------------------------------
   683 #------------------------------------------------------------------------------
   662 # High-resolution timer support
   684 # High-resolution timer support
   663 #------------------------------------------------------------------------------
   685 #------------------------------------------------------------------------------
       
   686 
       
   687 AC_MSG_CHECKING([whether to use high-resolution timers for scheduling])
   664 
   688 
   665 AC_ARG_ENABLE([hrtimer],
   689 AC_ARG_ENABLE([hrtimer],
   666     AS_HELP_STRING([--enable-hrtimer],
   690     AS_HELP_STRING([--enable-hrtimer],
   667                    [Use high-resolution timer for scheduling (default: no)]),
   691                    [Use high-resolution timer for scheduling (default: no)]),
   668     [
   692     [
   678     [hrtimer=0]
   702     [hrtimer=0]
   679 )
   703 )
   680 
   704 
   681 if test "x${hrtimer}" = "x1"; then
   705 if test "x${hrtimer}" = "x1"; then
   682     AC_DEFINE([EC_USE_HRTIMER], [1], [Use hrtimer for scheduling])
   706     AC_DEFINE([EC_USE_HRTIMER], [1], [Use hrtimer for scheduling])
       
   707     AC_MSG_RESULT([yes])
       
   708 else
       
   709     AC_MSG_RESULT([no])
   683 fi
   710 fi
   684 
   711 
   685 #------------------------------------------------------------------------------
   712 #------------------------------------------------------------------------------
   686 # Read alias address from register
   713 # Read alias address from register
   687 #------------------------------------------------------------------------------
   714 #------------------------------------------------------------------------------
       
   715 
       
   716 AC_MSG_CHECKING([whether to read alias addresses from registers])
   688 
   717 
   689 AC_ARG_ENABLE([regalias],
   718 AC_ARG_ENABLE([regalias],
   690     AS_HELP_STRING([--enable-regalias],
   719     AS_HELP_STRING([--enable-regalias],
   691                    [Read alias adresses from register (default: no)]),
   720                    [Read alias adresses from register (default: no)]),
   692     [
   721     [
   702     [regalias=0]
   731     [regalias=0]
   703 )
   732 )
   704 
   733 
   705 if test "x${regalias}" = "x1"; then
   734 if test "x${regalias}" = "x1"; then
   706     AC_DEFINE([EC_REGALIAS], [1], [Read alias adresses from register])
   735     AC_DEFINE([EC_REGALIAS], [1], [Read alias adresses from register])
       
   736     AC_MSG_RESULT([yes])
       
   737 else
       
   738     AC_MSG_RESULT([no])
   707 fi
   739 fi
   708 
   740 
   709 #------------------------------------------------------------------------------
   741 #------------------------------------------------------------------------------
   710 # Command-line tool
   742 # Command-line tool
   711 #-----------------------------------------------------------------------------
   743 #-----------------------------------------------------------------------------
       
   744 
       
   745 AC_MSG_CHECKING([whether to build the command-line tool])
   712 
   746 
   713 AC_ARG_ENABLE([tool],
   747 AC_ARG_ENABLE([tool],
   714     AS_HELP_STRING([--enable-tool],
   748     AS_HELP_STRING([--enable-tool],
   715                    [Build command-line tool (default: yes)]),
   749                    [Build command-line tool (default: yes)]),
   716     [
   750     [
   724         esac
   758         esac
   725     ],
   759     ],
   726     [tool=1]
   760     [tool=1]
   727 )
   761 )
   728 
   762 
       
   763 if test "x${tool}" = "x1"; then
       
   764     AC_MSG_RESULT([yes])
       
   765 else
       
   766     AC_MSG_RESULT([no])
       
   767 fi
       
   768 
   729 AM_CONDITIONAL(BUILD_TOOL, test "x$tool" = "x1")
   769 AM_CONDITIONAL(BUILD_TOOL, test "x$tool" = "x1")
   730 
   770 
   731 #------------------------------------------------------------------------------
   771 #------------------------------------------------------------------------------
   732 # Userspace library generation
   772 # Userspace library generation
   733 #------------------------------------------------------------------------------
   773 #------------------------------------------------------------------------------
       
   774 
       
   775 AC_MSG_CHECKING([whether to build the userspace library])
   734 
   776 
   735 AC_ARG_ENABLE([userlib],
   777 AC_ARG_ENABLE([userlib],
   736     AS_HELP_STRING([--enable-userlib],
   778     AS_HELP_STRING([--enable-userlib],
   737                    [Generation of the userspace library (default: yes)]),
   779                    [Generation of the userspace library (default: yes)]),
   738     [
   780     [
   746         esac
   788         esac
   747     ],
   789     ],
   748     [userlib=1]
   790     [userlib=1]
   749 )
   791 )
   750 
   792 
       
   793 if test "x${userlib}" = "x1"; then
       
   794     AC_MSG_RESULT([yes])
       
   795 else
       
   796     AC_MSG_RESULT([no])
       
   797 fi
       
   798 
   751 AM_CONDITIONAL(ENABLE_USERLIB, test "x$userlib" = "x1")
   799 AM_CONDITIONAL(ENABLE_USERLIB, test "x$userlib" = "x1")
   752 
   800 
   753 #------------------------------------------------------------------------------
   801 #------------------------------------------------------------------------------
   754 # TTY driver
   802 # TTY driver
   755 #------------------------------------------------------------------------------
   803 #------------------------------------------------------------------------------
       
   804 
       
   805 AC_MSG_CHECKING([whether to build the tty driver])
   756 
   806 
   757 AC_ARG_ENABLE([tty],
   807 AC_ARG_ENABLE([tty],
   758     AS_HELP_STRING([--enable-tty],
   808     AS_HELP_STRING([--enable-tty],
   759                    [Generation of the ec_tty module (default: no)]),
   809                    [Generation of the ec_tty module (default: no)]),
   760     [
   810     [
   768         esac
   818         esac
   769     ],
   819     ],
   770     [tty=0]
   820     [tty=0]
   771 )
   821 )
   772 
   822 
       
   823 if test "x${tty}" = "x1"; then
       
   824     AC_MSG_RESULT([yes])
       
   825 else
       
   826     AC_MSG_RESULT([no])
       
   827 fi
       
   828 
   773 AM_CONDITIONAL(ENABLE_TTY, test "x$tty" = "x1")
   829 AM_CONDITIONAL(ENABLE_TTY, test "x$tty" = "x1")
   774 AC_SUBST(ENABLE_TTY,[$tty])
   830 AC_SUBST(ENABLE_TTY,[$tty])
   775 
   831 
   776 #------------------------------------------------------------------------------
   832 #------------------------------------------------------------------------------
   777 # Slave identification wildcards
   833 # Slave identification wildcards
   778 #------------------------------------------------------------------------------
   834 #------------------------------------------------------------------------------
       
   835 
       
   836 AC_MSG_CHECKING([whether to allow identification wildcards])
   779 
   837 
   780 AC_ARG_ENABLE([wildcards],
   838 AC_ARG_ENABLE([wildcards],
   781     AS_HELP_STRING([--enable-wildcards],
   839     AS_HELP_STRING([--enable-wildcards],
   782                    [Enable vendor ID / product code wildcards (default: no)]),
   840                    [Enable vendor ID / product code wildcards (default: no)]),
   783     [
   841     [
   794 )
   852 )
   795 
   853 
   796 if test "x${wildcards}" = "x1"; then
   854 if test "x${wildcards}" = "x1"; then
   797     AC_DEFINE([EC_IDENT_WILDCARDS], [1],
   855     AC_DEFINE([EC_IDENT_WILDCARDS], [1],
   798         [Use vendor id / product code wildcards])
   856         [Use vendor id / product code wildcards])
       
   857     AC_MSG_RESULT([yes])
       
   858 else
       
   859     AC_MSG_RESULT([no])
   799 fi
   860 fi
   800 
   861 
   801 #------------------------------------------------------------------------------
   862 #------------------------------------------------------------------------------
   802 # Redundancy (number of devices)
   863 # Redundancy (number of devices)
   803 #------------------------------------------------------------------------------
   864 #------------------------------------------------------------------------------
   832 
   893 
   833 #------------------------------------------------------------------------------
   894 #------------------------------------------------------------------------------
   834 # SII assignment
   895 # SII assignment
   835 #------------------------------------------------------------------------------
   896 #------------------------------------------------------------------------------
   836 
   897 
       
   898 AC_MSG_CHECKING([whether to assign the SII to PDI])
       
   899 
   837 AC_ARG_ENABLE([sii-assign],
   900 AC_ARG_ENABLE([sii-assign],
   838     AS_HELP_STRING([--enable-sii-assign],
   901     AS_HELP_STRING([--enable-sii-assign],
   839                    [Enable SII assignment to PDI (default: no)]),
   902                    [Enable SII assignment to PDI (default: no)]),
   840     [
   903     [
   841         case "${enableval}" in
   904         case "${enableval}" in
   850     [siiassign=0]
   913     [siiassign=0]
   851 )
   914 )
   852 
   915 
   853 if test "x${siiassign}" = "x1"; then
   916 if test "x${siiassign}" = "x1"; then
   854     AC_DEFINE([EC_SII_ASSIGN], [1], [Assign SII to PDI])
   917     AC_DEFINE([EC_SII_ASSIGN], [1], [Assign SII to PDI])
       
   918     AC_MSG_RESULT([yes])
       
   919 else
       
   920     AC_MSG_RESULT([no])
   855 fi
   921 fi
   856 
   922 
   857 #------------------------------------------------------------------------------
   923 #------------------------------------------------------------------------------
   858 
   924 
   859 AC_CONFIG_FILES([
   925 AC_CONFIG_FILES([