free( control );
                        break;
                        
+#ifdef LDAP_CONTROL_NOOP
                } else if ( strcasecmp( control, "noop" ) == 0 ) {
                        if( cvalue != NULL ) {
                                fprintf( stderr, "noop: no control value expected" );
                        noop = 1 + crit;
                        free( control );
                        break;
+#endif
 
                } else {
                        fprintf( stderr, "Invalid general control name: %s\n", control );
                }
        }
 
-       if ( manageDSAit || noop ) {
+       if ( manageDSAit
+#ifdef LDAP_CONTROL_NOOP
+               || noop
+#endif
+       ) {
                int err, i = 0;
                LDAPControl c1, c2;
                LDAPControl *ctrls[3];
                        c1.ldctl_iscritical = manageDSAit > 1;
                }
 
+#ifdef LDAP_CONTROL_NOOP
                if ( noop ) {
                        ctrls[i++] = &c2;
                        ctrls[i] = NULL;
                        c2.ldctl_value.bv_len = 0;
                        c2.ldctl_iscritical = noop > 1;
                }
+#endif
        
                err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );