def __configure(self):
        """Setup configure options based on user parameters and CPU
           architecture"""

        if hpccm.config.g_cpu_arch == cpu_arch.X86_64:
            if not self.__configure_opts:
                self.__configure_opts = ['--enable-shared', '--enable-openmp',
                                         '--enable-threads', '--enable-sse2']

                if hpccm.config.test_cpu_feature_flag('avx'):
                    self.__configure_opts.append('--enable-avx')

                if hpccm.config.test_cpu_feature_flag('avx2'):
                    self.__configure_opts.append('--enable-avx2')

                if hpccm.config.test_cpu_feature_flag('avx512'):
                    self.__configure_opts.append('--enable-avx512')
        else:
            if not self.__configure_opts:
                self.__configure_opts = ['--enable-shared', '--enable-openmp',
                                         '--enable-threads']

        if self.__mpi:
            self.__configure_opts.append('--enable-mpi')
Setup configure options based on user parameters and CPU
           architecture
hpccm/building_blocks/fftw.py